container/profiles/src/main/java/org/mobicents/slee/container/management/jmx/ProfileProvisioningMBeanImpl.java
public Collection<ProfileID> getProfilesByDynamicQuery(String profileTableName,
			QueryExpression queryExpression) throws NullPointerException,
			UnrecognizedProfileTableNameException,
			UnrecognizedAttributeException, AttributeTypeMismatchException,
			ManagementException {
		
		if (logger.isDebugEnabled()) {
			logger.debug("getProfilesByDynamicQuery( profileTableName = "
					+ profileTableName + " , queryExpression = " + queryExpression
					+ " )");
		}
		
		if (queryExpression == null) {
			throw new NullPointerException("queryExpression is null");
		}
		
		boolean b = sleeTransactionManagement.requireTransaction();

		Collection<ProfileID> profileIDs = new ArrayList<ProfileID>();
		try {
			ProfileTableImpl profileTable = sleeProfileManagement.getProfileTable(profileTableName);
			if (!profileTable.getProfileSpecificationComponent().isSlee11()) {
				throw new UnsupportedOperationException("JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables");
			}
			for (ProfileEntity profileEntity : profileTable.getProfileSpecificationComponent().getProfileEntityFramework().getProfilesByDynamicQuery(profileTableName,queryExpression)) {
				profileIDs.add(new ProfileID(profileEntity.getTableName(),profileEntity.getProfileName()));
			}
		} catch (NullPointerException e) {
			throw e;
		} catch (UnrecognizedProfileTableNameException e) {
			throw e;
		} catch (UnrecognizedAttributeException e) {
			throw e;
		} catch (AttributeTypeMismatchException e) {
			throw e;
		} catch (Throwable e) {
			throw new ManagementException("Failed to obtain ProfileNames for ProfileTable: " + profileTableName, e);
		}
		finally {
			try {
				sleeTransactionManagement.requireTransactionEnd(b,false);	
			} catch (Throwable e) {
				throw new ManagementException(e.getMessage(),e);
			}
		}

		return profileIDs;
		
	}
public Collection<ProfileID> getProfilesByDynamicQuery(String profileTableName,
			QueryExpression queryExpression) throws NullPointerException,
			UnrecognizedProfileTableNameException,
			UnrecognizedAttributeException, AttributeTypeMismatchException,
			ManagementException {
		
		if (logger.isDebugEnabled()) {
			logger.debug("getProfilesByDynamicQuery( profileTableName = "
					+ profileTableName + " , queryExpression = " + queryExpression
					+ " )");
		}
		
		if (queryExpression == null) {
			throw new NullPointerException("queryExpression is null");
		}
		
		boolean b = sleeTransactionManagement.requireTransaction();

		Collection<ProfileID> profileIDs = new ArrayList<ProfileID>();
		try {
			ProfileTableImpl profileTable = sleeProfileManagement.getProfileTable(profileTableName);
			if (!profileTable.getProfileSpecificationComponent().isSlee11()) {
				throw new UnsupportedOperationException("JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables");
			}
			for (ProfileEntity profileEntity : profileTable.getProfileSpecificationComponent().getProfileEntityFramework().getProfilesByDynamicQuery(profileTableName,queryExpression)) {
				profileIDs.add(new ProfileID(profileEntity.getTableName(),profileEntity.getProfileName()));
			}
		} catch (NullPointerException e) {
			throw e;
		} catch (UnrecognizedProfileTableNameException e) {
			throw e;
		} catch (UnrecognizedAttributeException e) {
			throw e;
		} catch (AttributeTypeMismatchException e) {
			throw e;
		} catch (Throwable e) {
			throw new ManagementException("Failed to obtain ProfileNames for ProfileTable: " + profileTableName, e);
		}
		finally {
			try {
				sleeTransactionManagement.requireTransactionEnd(b,false);	
			} catch (Throwable e) {
				throw new ManagementException(e.getMessage(),e);
			}
		}

		return profileIDs;
		
	}
public Collection < ProfileID > getProfilesByDynamicQuery ( String profileTableName , QueryExpression queryExpression ) throws NullPointerException , UnrecognizedProfileTableNameException , UnrecognizedAttributeException , AttributeTypeMismatchException , ManagementException { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "getProfilesByDynamicQuery( profileTableName = " + profileTableName + " , queryExpression = " + queryExpression + " )" ) ; } if ( queryExpression == null ) { throw new NullPointerException ( "queryExpression is null" ) ; } boolean b = sleeTransactionManagement . requireTransaction ( ) ; Collection < ProfileID > profileIDs = new ArrayList < ProfileID > ( ) ; try { ProfileTableImpl profileTable = sleeProfileManagement . getProfileTable ( profileTableName ) ; if ( ! profileTable . getProfileSpecificationComponent ( ) . isSlee11 ( ) ) { throw new UnsupportedOperationException ( "JAIN SLEE 1.1 Specs forbiddens the usage of this method on SLEE 1.0 Profile Tables" ) ; } for ( ProfileEntity profileEntity : profileTable . getProfileSpecificationComponent ( ) . getProfileEntityFramework ( ) . getProfilesByDynamicQuery ( profileTableName , queryExpression ) ) { profileIDs . add ( new ProfileID ( profileEntity . getTableName ( ) , profileEntity . getProfileName ( ) ) ) ; } } catch ( NullPointerException e ) { throw e ; } catch ( UnrecognizedProfileTableNameException e ) { throw e ; } catch ( UnrecognizedAttributeException e ) { throw e ; } catch ( AttributeTypeMismatchException e ) { throw e ; } catch ( Throwable e ) { throw new ManagementException ( "Failed to obtain ProfileNames for ProfileTable: " + profileTableName , e ) ; } finally { try { sleeTransactionManagement . requireTransactionEnd ( b , false ) ; } catch ( Throwable e ) { throw new ManagementException ( e . getMessage ( ) , e ) ; } } return profileIDs ; }
/*
(non-Javadoc)
@see javax.slee.management.ProfileProvisioningMBean#getProfilesByDynamicQuery(java.lang.String, javax.slee.profile.query.QueryExpression)
/ * ( non - Javadoc )