mirror of
https://github.com/apache/openjpa.git
synced 2025-02-20 17:05:15 +00:00
OPENJPA-1894: reduce the number of Strings created by SelectImpl.getTableIndex
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1037819 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2009b5c016
commit
7178dd3f00
@ -2032,7 +2032,7 @@ public class SelectImpl
|
||||
Integer i = null;
|
||||
Object key = table.getFullIdentifier().getName();
|
||||
if (pj != null && pj.path() != null)
|
||||
key = new Key(pj.path().toString(), key);
|
||||
key = new Key(pj.getPathStr(), key);
|
||||
|
||||
if (_ctx != null && (_parent != null || _subsels != null || _hasSub)) {
|
||||
i = findAliasForQuery(table, pj, key, create);
|
||||
@ -2194,6 +2194,10 @@ public class SelectImpl
|
||||
public StringBuilder path() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getPathStr() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JoinSet joins() {
|
||||
return null;
|
||||
@ -2551,6 +2555,10 @@ public class SelectImpl
|
||||
public StringBuilder path() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getPathStr() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JoinSet joins() {
|
||||
return null;
|
||||
@ -2630,6 +2638,7 @@ public class SelectImpl
|
||||
protected String correlatedVar = null;
|
||||
protected Context context = null;
|
||||
protected Context lastContext = null;
|
||||
protected String pathStr = null;
|
||||
|
||||
public Select getSelect() {
|
||||
return null;
|
||||
@ -2734,8 +2743,16 @@ public class SelectImpl
|
||||
path = new StringBuilder(str);
|
||||
else
|
||||
path.append('.').append(str);
|
||||
pathStr = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getPathStr() {
|
||||
if (pathStr == null) {
|
||||
pathStr = path.toString();
|
||||
}
|
||||
return pathStr;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "PathJoinsImpl<" + hashCode() + ">: "
|
||||
@ -3297,5 +3314,7 @@ interface PathJoins
|
||||
* @return
|
||||
*/
|
||||
public Select getSelect();
|
||||
|
||||
public String getPathStr();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user