container/profiles/src/main/java/org/mobicents/slee/runtime/facilities/profile/ProfileFacilityImpl.java
public ProfileID getProfileByIndexedAttribute(
			java.lang.String profileTableName, java.lang.String attributeName,
			java.lang.Object attributeValue) throws NullPointerException,
			UnrecognizedProfileTableNameException,
			UnrecognizedAttributeException, AttributeNotIndexedException,
			AttributeTypeMismatchException,
			TransactionRolledbackLocalException, FacilityException {

		if (logger.isTraceEnabled()) {
			logger.trace("getProfileByIndexedAttribute( profileTableName = "
					+ profileTableName + " , attributeName = " + attributeName
					+ " , attributeValue = " + attributeValue + " )");
		}
		
		profileManagement.getSleeContainer().getTransactionManager().mandateTransaction();

		try {
			ProfileTableImpl profileTable = profileManagement.getProfileTable(
							profileTableName);
			if (profileTable.getProfileSpecificationComponent().isSlee11()) {
				throw new FacilityException(
						"JAIN SLEE 1.1 Specs forbidden the usage of this method on SLEE 1.1 Profile Tables");
			}
			Collection<ProfileID> profileIDs = profileTable.getProfilesByAttribute(attributeName,attributeValue,false);
			if (profileIDs.isEmpty()) {
				return null;
			}
			else {
				return profileIDs.iterator().next();
			}
		} catch (NullPointerException e) {
			throw e;
		} catch (UnrecognizedProfileTableNameException e) {
			throw e;
		} catch (UnrecognizedAttributeException e) {
			throw e;
		} catch (AttributeNotIndexedException e) {
			throw e;
		} catch (AttributeTypeMismatchException e) {
			throw e;
		} catch (Throwable e) {
			throw new FacilityException(e.getMessage(), e);
		}
	}
public ProfileID getProfileByIndexedAttribute(
			java.lang.String profileTableName, java.lang.String attributeName,
			java.lang.Object attributeValue) throws NullPointerException,
			UnrecognizedProfileTableNameException,
			UnrecognizedAttributeException, AttributeNotIndexedException,
			AttributeTypeMismatchException,
			TransactionRolledbackLocalException, FacilityException {

		if (logger.isTraceEnabled()) {
			logger.trace("getProfileByIndexedAttribute( profileTableName = "
					+ profileTableName + " , attributeName = " + attributeName
					+ " , attributeValue = " + attributeValue + " )");
		}
		
		profileManagement.getSleeContainer().getTransactionManager().mandateTransaction();

		try {
			ProfileTableImpl profileTable = profileManagement.getProfileTable(
							profileTableName);
			if (profileTable.getProfileSpecificationComponent().isSlee11()) {
				throw new FacilityException(
						"JAIN SLEE 1.1 Specs forbidden the usage of this method on SLEE 1.1 Profile Tables");
			}
			Collection<ProfileID> profileIDs = profileTable.getProfilesByAttribute(attributeName,attributeValue,false);
			if (profileIDs.isEmpty()) {
				return null;
			}
			else {
				return profileIDs.iterator().next();
			}
		} catch (NullPointerException e) {
			throw e;
		} catch (UnrecognizedProfileTableNameException e) {
			throw e;
		} catch (UnrecognizedAttributeException e) {
			throw e;
		} catch (AttributeNotIndexedException e) {
			throw e;
		} catch (AttributeTypeMismatchException e) {
			throw e;
		} catch (Throwable e) {
			throw new FacilityException(e.getMessage(), e);
		}
	}
public ProfileID getProfileByIndexedAttribute ( java . lang . String profileTableName , java . lang . String attributeName , java . lang . Object attributeValue ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedAttributeException , AttributeNotIndexedException , AttributeTypeMismatchException , TransactionRolledbackLocalException , FacilityException { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "getProfileByIndexedAttribute( profileTableName = " + profileTableName + " , attributeName = " + attributeName + " , attributeValue = " + attributeValue + " )" ) ; } profileManagement . getSleeContainer ( ) . getTransactionManager ( ) . mandateTransaction ( ) ; try { ProfileTableImpl profileTable = profileManagement . getProfileTable ( profileTableName ) ; if ( profileTable . getProfileSpecificationComponent ( ) . isSlee11 ( ) ) { throw new FacilityException ( "JAIN SLEE 1.1 Specs forbidden the usage of this method on SLEE 1.1 Profile Tables" ) ; } Collection < ProfileID > profileIDs = profileTable . getProfilesByAttribute ( attributeName , attributeValue , false ) ; if ( profileIDs . isEmpty ( ) ) { return null ; } else { return profileIDs . iterator ( ) . next ( ) ; } } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedAttributeException e ) { throw e ; } catch ( AttributeNotIndexedException e ) { throw e ; } catch ( AttributeTypeMismatchException e ) { throw e ; } catch ( Throwable e ) { throw new FacilityException ( e . getMessage ( ) , e ) ; } }
Get a ProfileID object that identifies the profile contained in the
specified profile table, where the specified profile attribute is set to
the specified value. In the case of a profile attribute of an array type,
the type of the specified value must be the base component type of the
array, not the array type itself, and the SLEE will return the profile
identifier of any profile that contains the value within the array.

Note: The profile table's default profile is not considered when
determining matching profiles as it has no profile identifier that can be
returned by this method.

This method is a required transactional method.

This method can only be invoked against profile tables created from SLEE
1.0 profile specifications. Attempting to invoke it on a profile table
created from a SLEE 1.1 profile specification causes a FacilityException
to be thrown.

@deprecated
@param profileTableName
- the name of the profile table.
@param attributeName
- the name of the profile's attribute to check.
@param attributeValue
- the value to compare the attribute with. Returns: the
profile identifier for the first matching profile, or null if
no matching profile was found.
@throws java.lang.NullPointerException
- if any attribute is null.
@throws UnrecognizedProfileTableNameException
- if a profile table with the specified name does not exist.
@throws UnrecognizedAttributeException
- if an attribute with the specified name is not defined in
the profile specification for the specified profile table.
@throws AttributeNotIndexedException
- if the specified attribute is not indexed in the profile
specification for the specified profile table.
@throws AttributeTypeMismatchException
- if the type of the supplied attribute value does not match
the type of the specified indexed attribute.
@throws TransactionRolledbackLocalException
- if this method was invoked without a valid transaction
context and the transaction started by this method failed to
commit.
@throws FacilityException
- if the profile identifier could not be obtained due to a
system-level failure.
Get a ProfileID object that identifies the profile contained in the specified profile table where the specified profile attribute is set to the specified value . In the case of a profile attribute of an array type the type of the specified value must be the base component type of the array not the array type itself and the SLEE will return the profile identifier of any profile that contains the value within the array .