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 .