query = createQuery(
Query query = createQuery(
	public SignetSubject getSubject(String sourceId, String subjectId)			throws ObjectNotFoundException	{		Query query;		List resultList;		try		{			query = createQuery(					"from " +					SignetSubject.class.getName() +					" as signetSubject " +					"where " +					"sourceID = :source_id " +					"and " +					"subjectID = :subject_id ");			query.setString("subject_id", subjectId);			query.setString("source_id", sourceId);			resultList = query.list();		}		catch (HibernateException e)		{			throw new SignetRuntimeException(e);		}		SignetSubject retval = null;		Object[] msgData;		MessageFormat msgFmt;		switch (resultList.size())		{			case (0):				msgData = new Object[] { sourceId, subjectId };				String msgTemplate = ResLoaderApp.getString("HibernateDb.msg.exc.SubjNotFound");  //$NON-NLS-1$				msgFmt = new MessageFormat(msgTemplate);				String msg = msgFmt.format(msgData);				throw new ObjectNotFoundException(msg);			case (1):				retval = (SignetSubject)resultList.iterator().next();				break;			default:				msgData = new Object[] { new Integer(resultList.size()), subjectId, sourceId };				msgFmt = new MessageFormat(ResLoaderApp.getString("HibernateDb.msg.exc.multiSigSubj_1") + //$NON-NLS-1$						ResLoaderApp.getString("HibernateDb.msg.exc.multiSigSubj_2") + //$NON-NLS-1$						ResLoaderApp.getString("HibernateDb.msg.exc.multiSigSubj_3")); //$NON-NLS-1$				throw new SignetRuntimeException(msgFmt.format(msgData));		}		return (retval);	}