protected Collection < ModelType > getModelInstances ( ModeledPermissions < ? extends EntityModel > targetEntity , Collection < PermissionType > permissions ) { // Create new collection of models by manually converting each permission Collection < ModelType > models = new ArrayList < ModelType > ( permissions . size ( ) ) ; for ( PermissionType permission : permissions ) models . ( getModelInstance ( targetEntity , permission ) ) ; return models ; }
Returns a collection of model objects which are based on the given permissions and target entity .