Private static WTPart getPart (String s, String s1, s2 String)
	throws WTExceptionThrows WTException
{
	WTPart wtpart = getCachedPart(s, s1, s2);

	if(wtpart == null && s != null)
	{
		boolean flag = false;Boolean flag = false;
		QuerySpec queryspec = new QuerySpec(wt.part.WTPart.class);
		queryspec.appendWhere(new SearchCondition(wt.part.WTPart.class, "master>number", "=", s.toUpperCase(), false));

		if(s1 != null)If (s1> null)  {

			queryspec.appendAnd();
			queryspec.appendWhere(new SearchCondition(wt.part.WTPart.class, "versionInfo.identifier.versionId", "=", s1, false));

			if(s2 != null) {
				 queryspec.appendAnd();
				 queryspec.appendWhere(new SearchCondition(wt.part.WTPart.class, "iterationInfo.identifier.iterationId", "=", s2, false));
			}
			else {
				 queryspec.appendAnd();
				 queryspec.appendWhere(new SearchCondition(wt.part.WTPart.class, "iterationInfo.latest", "TRUE"));
			}
		}
		else {
			flag = true;
		}

		QueryResult queryresult = PersistenceHelper.manager.find(queryspec);

		if(flag) {
			queryresult = (new OwnershipIndependentLatestConfigSpec()).process(queryresult);
		}

		if(queryresult.size() > 0) {
			wtpart = (WTPart)queryresult.nextElement();
			wtpart = cachePart(wtpart);
		}
	 }
	 return wtpart;
}


