mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57035: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 56502: Merged HEAD-BUG-FIX to V4.2-BUG-FIX (4.2.1) 55925: <<NOT IN 4.1.6>> Merged V4.1-BUG-FIX (4.1.7) to HEAD-BUG-FIX (4.2) 55707: Formatting during investigations of MNT-9510 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61668 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -72,63 +72,63 @@ public class FilterSortNodeEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getPattern()
|
public String getPattern()
|
||||||
{
|
{
|
||||||
return pattern;
|
return pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String escape(String s, char escapeChar)
|
protected String escape(String s, char escapeChar)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
int idx = -1;
|
int idx = -1;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
idx = s.indexOf(escapeChar, offset);
|
idx = s.indexOf(escapeChar, offset);
|
||||||
if(idx != -1)
|
if(idx != -1)
|
||||||
{
|
{
|
||||||
sb.append(s.substring(offset, idx));
|
sb.append(s.substring(offset, idx));
|
||||||
sb.append("\\");
|
sb.append("\\");
|
||||||
sb.append(escapeChar);
|
sb.append(escapeChar);
|
||||||
offset = idx + 1;
|
offset = idx + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while(idx != -1);
|
while(idx != -1);
|
||||||
sb.append(s.substring(offset));
|
sb.append(s.substring(offset));
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPattern(String pattern)
|
public void setPattern(String pattern)
|
||||||
{
|
{
|
||||||
if(pattern != null)
|
if(pattern != null)
|
||||||
{
|
{
|
||||||
// escape the '%' character with '\' (standard SQL escape character)
|
// escape the '%' character with '\' (standard SQL escape character)
|
||||||
pattern = escape(pattern, '%');
|
pattern = escape(pattern, '%');
|
||||||
// replace the wildcard character '*' with the one used in database queries i.e. '%'
|
// replace the wildcard character '*' with the one used in database queries i.e. '%'
|
||||||
this.pattern = pattern.replace('*', '%');
|
this.pattern = pattern.replace('*', '%');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAssocTypeQNameIds(Set<Long> assocTypeQNameIds)
|
public void setAssocTypeQNameIds(Set<Long> assocTypeQNameIds)
|
||||||
{
|
{
|
||||||
this.assocTypeQNameIds = assocTypeQNameIds;
|
this.assocTypeQNameIds = assocTypeQNameIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Long> getAssocTypeQNameIds()
|
public Set<Long> getAssocTypeQNameIds()
|
||||||
{
|
{
|
||||||
return assocTypeQNameIds;
|
return assocTypeQNameIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getNamePropertyQNameId()
|
public Long getNamePropertyQNameId()
|
||||||
{
|
{
|
||||||
return namePropertyQNameId;
|
return namePropertyQNameId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNamePropertyQNameId(Long namePropertyQNameId)
|
public void setNamePropertyQNameId(Long namePropertyQNameId)
|
||||||
{
|
{
|
||||||
this.namePropertyQNameId = namePropertyQNameId;
|
this.namePropertyQNameId = namePropertyQNameId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NodePropertyEntity getProp1()
|
public NodePropertyEntity getProp1()
|
||||||
{
|
{
|
||||||
return prop1;
|
return prop1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user