Package org.dspace.content.dao
Interface RelationshipTypeDAO
- All Superinterfaces:
GenericDAO<RelationshipType>
- All Known Implementing Classes:
RelationshipTypeDAOImpl
Database Access Object Interface class for the RelationshipType object
The implementation of this class is responsible for all
database calls for the RelationshipType object and is autowired by spring
This class should only be accessed from a single service and should never be exposed outside of the API
-
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 rightTypefindByEntityType(Context context, EntityType entityType) 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) 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) This method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightTypefindByLeftwardOrRightwardTypeName(Context context, String type) This method will return a list of RelationshipType objects for which the given label is equal to either the leftwardType or rightwardType.findByLeftwardOrRightwardTypeName(Context context, String type, Integer limit, Integer offset) This method will return a list of RelationshipType objects for which the given label is equal to either the leftLabel or rightLabel.findbyTypesAndTypeName(Context context, EntityType leftType, EntityType rightType, String leftwardType, String rightwardType) This method is used to retrieve the RelationshipType object that has the same leftType, rightType, leftwardType and rightwardType as given in the parameters
-
Method Details
-
findbyTypesAndTypeName
RelationshipType findbyTypesAndTypeName(Context context, EntityType leftType, EntityType rightType, String leftwardType, String rightwardType) throws SQLException This method is used to retrieve the RelationshipType object that has the same leftType, rightType, leftwardType and rightwardType as given in the parameters- Parameters:
context- The relevant DSpace contextleftType- The leftType EntityType object to be matched in the queryrightType- The rightType EntityType object to be matched in the queryleftwardType- The leftwardType String to be matched in the queryrightwardType- The rightwardType String to be matched in the query- Returns:
- The RelationshipType object that matches all the given parameters
- Throws:
SQLException- If something goes wrong
-
findByLeftwardOrRightwardTypeName
List<RelationshipType> findByLeftwardOrRightwardTypeName(Context context, String type) throws SQLException This method will return a list of RelationshipType objects for which the given label is equal to either the leftwardType or rightwardType.- Parameters:
context- The relevant DSpace contexttype- The label that will be used to check on- Returns:
- A list of RelationshipType objects that have the given label as either the leftwardType or rightwardType
- Throws:
SQLException- If something goes wrong
-
findByLeftwardOrRightwardTypeName
List<RelationshipType> findByLeftwardOrRightwardTypeName(Context context, String type, Integer limit, Integer offset) throws SQLException This method will return a list of RelationshipType objects for which the given label is equal to either the leftLabel or rightLabel.- Parameters:
context- The relevant DSpace contexttype- The label that will be used to check onlimit- paging limitoffset- paging offset- Returns:
- A list of RelationshipType objects that have the given label as either the leftLabel or rightLabel
- Throws:
SQLException- If something goes wrong
-
findByEntityType
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 on- 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, 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 onlimit- 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
-
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
-
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
-