Java Code Examples for org.mybatis.generator.internal.rules.Rules#generateUpdateByPrimaryKeyWithBLOBs()
The following examples show how to use
org.mybatis.generator.internal.rules.Rules#generateUpdateByPrimaryKeyWithBLOBs() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExtendedDAOMethodNameCalculator.java From mybatis-generator-core-fix with Apache License 2.0 | 6 votes |
/** * 1. if this will be the only updateByPrimaryKey, then the result should be * updateByPrimaryKey. 2. If the other method is enabled, but there are * seperate base and blob classes, then the method name should be * updateByPrimaryKey 3. Else the method name should be * updateByPrimaryKeyWithoutBLOBs */ public String getUpdateByPrimaryKeyWithoutBLOBsMethodName( IntrospectedTable introspectedTable) { StringBuilder sb = new StringBuilder(); sb.append("update"); //$NON-NLS-1$ sb.append(introspectedTable.getFullyQualifiedTable() .getDomainObjectName()); Rules rules = introspectedTable.getRules(); if (!rules.generateUpdateByPrimaryKeyWithBLOBs()) { sb.append("ByPrimaryKey"); //$NON-NLS-1$ } else if (rules.generateRecordWithBLOBsClass()) { sb.append("ByPrimaryKey"); //$NON-NLS-1$ } else { sb.append("ByPrimaryKeyWithoutBLOBs"); //$NON-NLS-1$ } return sb.toString(); }
Example 2
Source File: ExtendedDAOMethodNameCalculator.java From mybatis-generator-plus with Apache License 2.0 | 6 votes |
/** * 1. if this will be the only updateByPrimaryKey, then the result should be * updateByPrimaryKey. 2. If the other method is enabled, but there are * seperate base and blob classes, then the method name should be * updateByPrimaryKey 3. Else the method name should be * updateByPrimaryKeyWithoutBLOBs */ public String getUpdateByPrimaryKeyWithoutBLOBsMethodName( IntrospectedTable introspectedTable) { StringBuilder sb = new StringBuilder(); sb.append("update"); //$NON-NLS-1$ sb.append(introspectedTable.getFullyQualifiedTable() .getDomainObjectName()); Rules rules = introspectedTable.getRules(); if (!rules.generateUpdateByPrimaryKeyWithBLOBs()) { sb.append("ByPrimaryKey"); //$NON-NLS-1$ } else if (rules.generateRecordWithBLOBsClass()) { sb.append("ByPrimaryKey"); //$NON-NLS-1$ } else { sb.append("ByPrimaryKeyWithoutBLOBs"); //$NON-NLS-1$ } return sb.toString(); }
Example 3
Source File: DefaultDAOMethodNameCalculator.java From mybatis-generator-core-fix with Apache License 2.0 | 5 votes |
/** * 1. if this will be the only updateByPrimaryKey, then the result should be * updateByPrimaryKey. 2. If the other method is enabled, but there are * seperate base and blob classes, then the method name should be * updateByPrimaryKey 3. Else the method name should be * updateByPrimaryKeyWithoutBLOBs */ public String getUpdateByPrimaryKeyWithoutBLOBsMethodName( IntrospectedTable introspectedTable) { Rules rules = introspectedTable.getRules(); if (!rules.generateUpdateByPrimaryKeyWithBLOBs()) { return "updateByPrimaryKey"; //$NON-NLS-1$ } else if (rules.generateRecordWithBLOBsClass()) { return "updateByPrimaryKey"; //$NON-NLS-1$ } else { return "updateByPrimaryKeyWithoutBLOBs"; //$NON-NLS-1$ } }
Example 4
Source File: DefaultDAOMethodNameCalculator.java From mybatis-generator-plus with Apache License 2.0 | 5 votes |
/** * 1. if this will be the only updateByPrimaryKey, then the result should be * updateByPrimaryKey. 2. If the other method is enabled, but there are * seperate base and blob classes, then the method name should be * updateByPrimaryKey 3. Else the method name should be * updateByPrimaryKeyWithoutBLOBs */ public String getUpdateByPrimaryKeyWithoutBLOBsMethodName( IntrospectedTable introspectedTable) { Rules rules = introspectedTable.getRules(); if (!rules.generateUpdateByPrimaryKeyWithBLOBs()) { return "updateByPrimaryKey"; //$NON-NLS-1$ } else if (rules.generateRecordWithBLOBsClass()) { return "updateByPrimaryKey"; //$NON-NLS-1$ } else { return "updateByPrimaryKeyWithoutBLOBs"; //$NON-NLS-1$ } }