Subversion Repositories XServices

Rev

Rev 32 | Rev 42 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32 Rev 34
Line 189... Line 189...
189
		if(fieldname.equals(SBMStaticFields.STATE.getValue())) {
189
		if(fieldname.equals(SBMStaticFields.STATE.getValue())) {
190
			if(ttitem.getState()==null || ttitem.getState().isNil()) return "";
190
			if(ttitem.getState()==null || ttitem.getState().isNil()) return "";
191
			return ttitem.getState().getValue();
191
			return ttitem.getState().getValue();
192
		}
192
		}
193
		if(fieldname.equals(SBMStaticFields.ID.getValue())) {
193
		if(fieldname.equals(SBMStaticFields.ID.getValue())) {
194
			return ttitem.getGenericItem().getValue().getItemID().getValue();
194
			return ttitem.getGenericItem().getValue().getItemName().getValue()+
-
 
195
			" ["+ttitem.getGenericItem().getValue().getItemID().getValue()+"]";
195
		}
196
		}
196
		if(fieldname.equals(SBMStaticFields.PROJECTID.getValue())) {
197
		if(fieldname.equals(SBMStaticFields.PROJECTID.getValue())) {
197
			if(ttitem.getClassification() ==null || ttitem.getClassification().isNil()) return "";
198
			if(ttitem.getClassification() ==null || ttitem.getClassification().isNil()) return "";
198
			return ttitem.getClassification().getValue();
199
			return ttitem.getClassification().getValue();
199
		}
200
		}
Line 449... Line 450...
449
				}
450
				}
450
			}
451
			}
451
		}
452
		}
452
		return values;
453
		return values;
453
	}
454
	}
-
 
455
 
-
 
456
	public List<SBMFieldValue> getValidSet(String tablename, String fieldname) {
-
 
457
		List<SBMFieldValue> list = new ArrayList<SBMFieldValue>();
-
 
458
		List<TTItem> ttlist = new ArrayList<TTItem>();
-
 
459
		String sql = "TS_ID in (select max(TS_ID) from "+tablename+" group by ts_"+fieldname+")";
-
 
460
		try {
-
 
461
			ttlist = getTTItemsByTable(tablename, sql);
-
 
462
		} catch (CoreException e) {
-
 
463
			new CoreException(
-
 
464
					RepositoryStatus.createInternalError(
-
 
465
							SBMConnectorPlugin.PLUGIN_ID, e.getMessage(), e));
-
 
466
		}
-
 
467
		for(TTItem ttitem : ttlist) {
-
 
468
			list.add(getFieldValue(ttitem, fieldname));
-
 
469
		}
-
 
470
		
-
 
471
		return list;		
-
 
472
	}
454
}
473
}