| | |
| | | continue; |
| | | } |
| | | |
| | | property = methodName.substring(3); |
| | | property = methodName.subString(3); |
| | | first = property.charAt(0); |
| | | property = Character.toLowerCase(first) + property.substring(1); |
| | | property = Character.toLowerCase(first) + property.subString(1); |
| | | |
| | | propertyRecorder.addGetMethod(property, method); |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | property = methodName.substring(2); |
| | | property = methodName.subString(2); |
| | | first = property.charAt(0); |
| | | property = Character.toLowerCase(first) + property.substring(1); |
| | | property = Character.toLowerCase(first) + property.subString(1); |
| | | |
| | | propertyRecorder.addGetMethod(property, method); |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | property = methodName.substring(3); |
| | | property = methodName.subString(3); |
| | | first = property.charAt(0); |
| | | property = Character.toLowerCase(first) + property.substring(1); |
| | | property = Character.toLowerCase(first) + property.subString(1); |
| | | |
| | | propertyRecorder.addSetMethod(property, method); |
| | | } |
| | |
| | | Integer idx = nameMap.get(name.toLowerCase()); |
| | | |
| | | if (idx == null) { |
| | | throw new Exception("set data string error: " + name + " not exist"); |
| | | throw new Exception("set data String error: " + name + " not exist"); |
| | | } |
| | | |
| | | PropertyReader propertyReader = propertyReaderArray[idx]; |
| | |
| | | |
| | | public String getSQLString(String name, Object entity) throws Exception { |
| | | if (name == null) { |
| | | throw new Exception("get sql string error: empty name"); |
| | | throw new Exception("get sql String error: empty name"); |
| | | } |
| | | |
| | | Integer idx = nameMap.get(name.toLowerCase()); |
| | | |
| | | if (idx == null) { |
| | | throw new Exception("get sql string error: " + name + " not exist"); |
| | | throw new Exception("get sql String error: " + name + " not exist"); |
| | | } |
| | | |
| | | PropertyReader propertyReader = propertyReaderArray[idx]; |
| | |
| | | return propertyReader.getSQLString(entity); |
| | | } |
| | | else { |
| | | throw new Exception("get json string error: index " + propertyIndex + " out of 0~" + size); |
| | | throw new Exception("get json String error: index " + propertyIndex + " out of 0~" + size); |
| | | } |
| | | } |
| | | |