Package org.dspace.content.dao.impl
Class RelationshipTypeDAOImpl
- java.lang.Object
-
- org.dspace.core.AbstractHibernateDAO<RelationshipType>
-
- org.dspace.content.dao.impl.RelationshipTypeDAOImpl
-
- All Implemented Interfaces:
RelationshipTypeDAO,GenericDAO<RelationshipType>
public class RelationshipTypeDAOImpl extends AbstractHibernateDAO<RelationshipType> implements RelationshipTypeDAO
-
-
Constructor Summary
Constructors Constructor Description RelationshipTypeDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<RelationshipType>findByEntityType(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 rightTypeList<RelationshipType>findByEntityType(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 rightTypeList<RelationshipType>findByEntityType(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 rightTypeList<RelationshipType>findByEntityType(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 rightTypeList<RelationshipType>findByLeftwardOrRightwardTypeName(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.List<RelationshipType>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.RelationshipTypefindbyTypesAndTypeName(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-
Methods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, delete, executeCriteriaQuery, findAll, findAll, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.core.GenericDAO
create, delete, findAll, findAll, findByID, findByID, findMany, findUnique, save
-
-
-
-
Method Detail
-
findbyTypesAndTypeName
public RelationshipType findbyTypesAndTypeName(Context context, EntityType leftType, EntityType rightType, String leftwardType, String rightwardType) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method is used to retrieve the RelationshipType object that has the same leftType, rightType, leftwardType and rightwardType as given in the parameters- Specified by:
findbyTypesAndTypeNamein interfaceRelationshipTypeDAO- 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
public List<RelationshipType> findByLeftwardOrRightwardTypeName(Context context, String type) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method will return a list of RelationshipType objects for which the given label is equal to either the leftwardType or rightwardType.- Specified by:
findByLeftwardOrRightwardTypeNamein interfaceRelationshipTypeDAO- 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
public List<RelationshipType> findByLeftwardOrRightwardTypeName(Context context, String type, Integer limit, Integer offset) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method will return a list of RelationshipType objects for which the given label is equal to either the leftLabel or rightLabel.- Specified by:
findByLeftwardOrRightwardTypeNamein interfaceRelationshipTypeDAO- 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
public List<RelationshipType> findByEntityType(Context context, EntityType entityType) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightType- Specified by:
findByEntityTypein interfaceRelationshipTypeDAO- 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
public List<RelationshipType> findByEntityType(Context context, EntityType entityType, Integer limit, Integer offset) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightType- Specified by:
findByEntityTypein interfaceRelationshipTypeDAO- 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
public List<RelationshipType> findByEntityType(Context context, EntityType entityType, Boolean isLeft) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightType- Specified by:
findByEntityTypein interfaceRelationshipTypeDAO- 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
public List<RelationshipType> findByEntityType(Context context, EntityType entityType, Boolean isLeft, Integer limit, Integer offset) throws SQLException
Description copied from interface:RelationshipTypeDAOThis method will return a list of RelationshipType objects for which the given EntityType object is equal to the leftType or rightType- Specified by:
findByEntityTypein interfaceRelationshipTypeDAO- 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
-
-