Class EntityFinder

java.lang.Object
edu.internet2.middleware.grouper.entity.EntityFinder

public class EntityFinder extends Object
class to find entities. TODO add in finder by attribute subject id TODO add former names
  • Constructor Details

    • EntityFinder

      public EntityFinder()
  • Method Details

    • assignTerms

      public EntityFinder assignTerms(String theTerms)
      add a search term, any substring which will be split by spaces
      Parameters:
      theTerms -
      Returns:
      this for chaining
    • addId

      public EntityFinder addId(String theId)
      add an entity id to search for
      Parameters:
      theId -
      Returns:
      this for chaining
    • addName

      public EntityFinder addName(String theName)
      add an entity name to search for
      Parameters:
      theName -
      Returns:
      this for chaining
    • addParentFolderId

      public EntityFinder addParentFolderId(String parentFolderId)
      add a parent folder id to search for. note, this is the immediate parent folder id, not ancestor
      Parameters:
      parentFolderId -
      Returns:
      this for chaining
    • addParentFolderName

      public EntityFinder addParentFolderName(String parentFolderName)
      add a parent folder name to search in, note this is the immediate parent folder name, not an ancentor
      Parameters:
      parentFolderName -
      Returns:
      this for chaining
    • findEntity

      public Entity findEntity(boolean exceptionIfNotFound)
      find an entity
      Parameters:
      exceptionIfNotFound - true if exception should be thrown if entity not found
      Returns:
      the entity or null or exception
    • addAncestorFolderName

      public EntityFinder addAncestorFolderName(String theFolderName)
      add an ancestor folder name to search in
      Parameters:
      theFolderName -
      Returns:
      the folder name
    • addAncestorFolderId

      public EntityFinder addAncestorFolderId(String theFolderId)
      add an ancestor folder id to search in
      Parameters:
      theFolderId -
      Returns:
      this for chaining
    • findEntities

      public Set<Entity> findEntities()
      find a list of entities
      Returns:
      the set of entities never null
    • findEntitiesAndSubjectIdentifier

      public List<Object[]> findEntitiesAndSubjectIdentifier()
      find a list of entities, and the String subjectIdentifier
      Returns:
      the list of entities never null, if there is a subjectIdentifier for the entity, that will be next in the array, else null
    • assignQueryOptions

      public EntityFinder assignQueryOptions(QueryOptions queryOptions1)
      assign query options for sorting and paging
      Parameters:
      queryOptions1 -
      Returns:
      this for paging
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: