Package org.dspace.content.service
Interface RelationshipTypeService
- All Superinterfaces:
DSpaceCRUDService<RelationshipType>
- All Known Implementing Classes:
RelationshipTypeServiceImpl
This Service uses DAOs to access information on the database objects for the RelationshipTypes
-
Method Summary
Modifier and TypeMethodDescriptionintcountByEntityType(Context context, EntityType entityType) Count all RelationshipType objects for which the given EntityType is equal to either the leftType or the rightTypecreate(Context context, EntityType leftEntityType, EntityType rightEntityType, String leftwardType, String rightwardType, Integer leftCardinalityMinInteger, Integer leftCardinalityMaxInteger, Integer rightCardinalityMinInteger, Integer rightCardinalityMaxInteger) This method will support the creation of a RelationshipType object with the given parameterscreate(Context context, EntityType leftEntityType, EntityType rightEntityType, String leftwardType, String rightwardType, Integer leftCardinalityMinInteger, Integer leftCardinalityMaxInteger, Integer rightCardinalityMinInteger, Integer rightCardinalityMaxInteger, Boolean copyToLeft, Boolean copyToRight, RelationshipType.Tilted tilted) This method will support the creation of a RelationshipType object with the given parameterscreate(Context context, RelationshipType relationshipType) This method creates the given RelationshipType object in the database and returns itRetrieves all RelationshipType objects currently in the systemRetrieves all RelationshipType objects currently in the systemfindByEntityType(Context context, EntityType entityType) Returns a list of RelationshipType objects for which the given EntityType is equal to either the leftType or the rightTypefindByEntityType(Context context, EntityType entityType, boolean isLeft) This method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightTypefindByEntityType(Context context, EntityType entityType, boolean isLeft, Integer limit, Integer offset) This method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightTypefindByEntityType(Context context, EntityType entityType, Integer limit, Integer offset) Returns a list of relationship types that matches provided EntityType object on any side of relationshipfindByLeftwardOrRightwardTypeName(Context context, String typeName) Retrieves all RelationshipType objects that have a left or right type that is equal to the given StringfindByLeftwardOrRightwardTypeName(Context context, String typeName, Integer limit, Integer offset) Retrieves all RelationshipType objects that have a left or right label that is equal to the given StringfindbyTypesAndTypeName(Context context, EntityType leftType, EntityType rightType, String leftwardType, String rightwardType) Retrieves a RelationshipType for which the given parameters all match the one in the returned RelationshipType
-
Method Details
-
create
RelationshipType create(Context context, RelationshipType relationshipType) throws SQLException, AuthorizeException This method creates the given RelationshipType object in the database and returns it- Parameters:
context- The relevant DSpace contextrelationshipType- The RelationshipType to be created in the database- Returns:
- The newly created RelationshipType
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong with authorizations
-
findbyTypesAndTypeName
RelationshipType findbyTypesAndTypeName(Context context, EntityType leftType, EntityType rightType, String leftwardType, String rightwardType) throws SQLException Retrieves a RelationshipType for which the given parameters all match the one in the returned RelationshipType- Parameters:
context- The relevant DSpace contextleftType- The rightType EntityType that needs to match for the returned RelationshipTyperightType- The rightType EntityType that needs to match for the returned RelationshipTypeleftwardType- The leftwardType String that needs to match for the returned RelationshipTyperightwardType- The rightwardType String that needs to match for the returned RelationshipType- Returns:
- Throws:
SQLException- If something goes wrong
-
findAll
Retrieves all RelationshipType objects currently in the system- Parameters:
context- The relevant DSpace context- Returns:
- The list of all RelationshipType objects currently in the system
- Throws:
SQLException- If something goes wrong
-
findAll
Retrieves all RelationshipType objects currently in the system- Parameters:
context- The relevant DSpace contextlimit- paging limitoffset- paging offset- Returns:
- The list of all RelationshipType objects currently in the system
- Throws:
SQLException- If something goes wrong
-
findByLeftwardOrRightwardTypeName
List<RelationshipType> findByLeftwardOrRightwardTypeName(Context context, String typeName) throws SQLException Retrieves all RelationshipType objects that have a left or right type that is equal to the given String- Parameters:
context- The relevant DSpace contexttypeName- The label that has to match- Returns:
- The list of all RelationshipType objects that have a left or right label that is equal to the given label param
- Throws:
SQLException- If something goes wrong
-
findByLeftwardOrRightwardTypeName
List<RelationshipType> findByLeftwardOrRightwardTypeName(Context context, String typeName, Integer limit, Integer offset) throws SQLException Retrieves all RelationshipType objects that have a left or right label that is equal to the given String- Parameters:
context- The relevant DSpace contexttypeName- The typeName that has to matchlimit- paging limitoffset- paging offset- Returns:
- The list of all RelationshipType objects that have a left or right label that is equal to the given label param
- Throws:
SQLException- If something goes wrong
-
findByEntityType
Returns a list of RelationshipType objects for which the given EntityType is equal to either the leftType or the rightType- Parameters:
context- The relevant DSpace contextentityType- The EntityType object used to check the leftType and rightType properties- Returns:
- A list of RelationshipType objects for which the leftType or rightType property are equal to the given EntityType object
- Throws:
SQLException- If something goes wrong
-
findByEntityType
List<RelationshipType> findByEntityType(Context context, EntityType entityType, Integer limit, Integer offset) throws SQLException Returns a list of relationship types that matches provided EntityType object on any side of relationship- Parameters:
context- The relevant DSpace contextentityType- The EntityType object that will be used to check onlimit- Paging limitoffset- Paging offset- Returns:
- Throws:
SQLException- If database error
-
countByEntityType
Count all RelationshipType objects for which the given EntityType is equal to either the leftType or the rightType- Parameters:
context- DSpace context objectentityType- The EntityType object used to check the leftType and rightType properties- Returns:
- Total RelationshipType objects
- Throws:
SQLException- If database error
-
findByEntityType
List<RelationshipType> findByEntityType(Context context, EntityType entityType, boolean isLeft) throws SQLException This method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightType- Parameters:
context- The relevant DSpace contextentityType- The EntityType object that will be used to check onisLeft- Boolean value used to filter by left_type or right_type. If true left_type results only else right_type results.- Returns:
- The list of RelationshipType objects that have the given EntityType object as either a leftType or rightType
- Throws:
SQLException- If something goes wrong
-
findByEntityType
List<RelationshipType> findByEntityType(Context context, EntityType entityType, boolean isLeft, Integer limit, Integer offset) throws SQLException This method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightType- Parameters:
context- The relevant DSpace contextentityType- The EntityType object that will be used to check onisLeft- Boolean value used to filter by left_type or right_type. If true left_type results only else right_type results.limit- paging limitoffset- paging offset- Returns:
- The list of RelationshipType objects that have the given EntityType object as either a leftType or rightType
- Throws:
SQLException- If something goes wrong
-
create
RelationshipType create(Context context, EntityType leftEntityType, EntityType rightEntityType, String leftwardType, String rightwardType, Integer leftCardinalityMinInteger, Integer leftCardinalityMaxInteger, Integer rightCardinalityMinInteger, Integer rightCardinalityMaxInteger) throws SQLException, AuthorizeException This method will support the creation of a RelationshipType object with the given parameters- Parameters:
context- The relevant DSpace contextleftEntityType- The leftEntityType EntityType object for this relationshipTyperightEntityType- The rightEntityType EntityType object for this relationshipTypeleftwardType- The leftwardType String object for this relationshipTyperightwardType- The rightwardType String object for this relationshipTypeleftCardinalityMinInteger- The leftCardinalityMinInteger Integer object for this relationshipTypeleftCardinalityMaxInteger- The leftCardinalityMaxInteger Integer object for this relationshipTyperightCardinalityMinInteger- The rightCardinalityMinInteger Integer object for this relationshipTyperightCardinalityMaxInteger- The rightCardinalityMaxInteger Integer object for this relationshipType- Returns:
- The created RelationshipType object for these properties
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-
create
RelationshipType create(Context context, EntityType leftEntityType, EntityType rightEntityType, String leftwardType, String rightwardType, Integer leftCardinalityMinInteger, Integer leftCardinalityMaxInteger, Integer rightCardinalityMinInteger, Integer rightCardinalityMaxInteger, Boolean copyToLeft, Boolean copyToRight, RelationshipType.Tilted tilted) throws SQLException, AuthorizeException This method will support the creation of a RelationshipType object with the given parameters- Parameters:
context- The relevant DSpace contextleftEntityType- The leftEntityType EntityType object for this relationshipTyperightEntityType- The rightEntityType EntityType object for this relationshipTypeleftwardType- The leftwardType String object for this relationshipTyperightwardType- The rightwardType String object for this relationshipTypeleftCardinalityMinInteger- The leftCardinalityMinInteger Integer object for this relationshipTypeleftCardinalityMaxInteger- The leftCardinalityMaxInteger Integer object for this relationshipTyperightCardinalityMinInteger- The rightCardinalityMinInteger Integer object for this relationshipTyperightCardinalityMaxInteger- The rightCardinalityMaxInteger Integer object for this relationshipType- Returns:
- The created RelationshipType object for these properties
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-