Skip to content

Commit

Permalink
FORGE-1267 Fix extraction of Id name from getters
Browse files Browse the repository at this point in the history
  • Loading branch information
VineetReynolds committed Jan 27, 2014
1 parent 3c86bc8 commit cf99162
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static String resolveIdGetterName(JavaClass entity)
type = ((Method<?>) member).getReturnType();
if (name.startsWith("get"))
{
name = name.substring(2);
name = name.substring(3);
}
}
else if (member instanceof Field)
Expand Down Expand Up @@ -163,7 +163,7 @@ public static String resolveIdName(JavaClass entity)
{
if (result.startsWith("get"))
{
result = result.substring(2);
result = result.substring(3);
}
}
}
Expand Down Expand Up @@ -219,7 +219,7 @@ public static String getSelectExpression(JavaClass entity, String entityTable)
{
if (name.startsWith("get"))
{
associationField = Strings.uncapitalize(name.substring(2));
associationField = Strings.uncapitalize(name.substring(3));
}
}
else if (member instanceof Field)
Expand Down Expand Up @@ -256,7 +256,7 @@ public static String getIdClause(JavaClass entity, String entityTable)
if (member instanceof Method)
{
// Getters are expected to obey JavaBean conventions
id = Strings.uncapitalize(memberName.substring(2));
id = Strings.uncapitalize(memberName.substring(3));
}
if (member instanceof Field)
{
Expand All @@ -283,7 +283,7 @@ public static String getOrderClause(JavaClass entity, char entityVariable)
if (member instanceof Method)
{
// Getters are expected to obey JavaBean conventions
id = Strings.uncapitalize(memberName.substring(2));
id = Strings.uncapitalize(memberName.substring(3));
}
if (member instanceof Field)
{
Expand Down

0 comments on commit cf99162

Please sign in to comment.