public class RelationshipTypeServiceImpl extends Object implements RelationshipTypeService
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected RelationshipTypeDAO |
relationshipTypeDAO |
| Constructor and Description |
|---|
RelationshipTypeServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
RelationshipType |
create(Context context) |
RelationshipType |
create(Context context,
EntityType leftEntityType,
EntityType rightEntityType,
String leftLabel,
String rightLabel,
Integer leftCardinalityMinInteger,
Integer leftCardinalityMaxInteger,
Integer rightCardinalityMinInteger,
Integer rightCardinalityMaxInteger)
This method will support the creation of a RelationshipType object with the given parameters
|
RelationshipType |
create(Context context,
RelationshipType relationshipType)
This method creates the given RelationshipType object in the database and returns it
|
void |
delete(Context context,
RelationshipType relationshipType) |
RelationshipType |
find(Context context,
int id) |
List<RelationshipType> |
findAll(Context context)
Retrieves all RelationshipType objects currently in the system
|
List<RelationshipType> |
findByEntityType(Context context,
EntityType entityType)
Returns a list of RelationshipType objects for which the given EntityType is equal to either the leftType
or the rightType
|
List<RelationshipType> |
findByLeftOrRightLabel(Context context,
String label)
Retrieves all RelationshipType objects that have a left or right label that is
equal to the given String
|
RelationshipType |
findbyTypesAndLabels(Context context,
EntityType leftType,
EntityType rightType,
String leftLabel,
String rightLabel)
Retrieves a RelationshipType for which the given parameters all match the one in the returned RelationshipType
|
void |
update(Context context,
List<RelationshipType> relationshipTypes) |
void |
update(Context context,
RelationshipType relationshipType) |
@Autowired(required=true) protected RelationshipTypeDAO relationshipTypeDAO
@Autowired(required=true) protected AuthorizeService authorizeService
public RelationshipType create(Context context) throws SQLException, AuthorizeException
create in interface DSpaceCRUDService<RelationshipType>SQLExceptionAuthorizeExceptionpublic RelationshipType create(Context context, RelationshipType relationshipType) throws SQLException, AuthorizeException
RelationshipTypeServicecreate in interface RelationshipTypeServicecontext - The relevant DSpace contextrelationshipType - The RelationshipType to be created in the databaseSQLException - If something goes wrongAuthorizeException - If something goes wrong with authorizationspublic RelationshipType findbyTypesAndLabels(Context context, EntityType leftType, EntityType rightType, String leftLabel, String rightLabel) throws SQLException
RelationshipTypeServicefindbyTypesAndLabels in interface RelationshipTypeServicecontext - 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 RelationshipTypeleftLabel - The leftLabel String that needs to match for the returned RelationshipTyperightLabel - The rightLabel String that needs to match for the returned RelationshipTypeSQLException - If something goes wrongpublic List<RelationshipType> findAll(Context context) throws SQLException
RelationshipTypeServicefindAll in interface RelationshipTypeServicecontext - The relevant DSpace contextSQLException - If something goes wrongpublic List<RelationshipType> findByLeftOrRightLabel(Context context, String label) throws SQLException
RelationshipTypeServicefindByLeftOrRightLabel in interface RelationshipTypeServicecontext - The relevant DSpace contextlabel - The label that has to matchSQLException - If something goes wrongpublic List<RelationshipType> findByEntityType(Context context, EntityType entityType) throws SQLException
RelationshipTypeServicefindByEntityType in interface RelationshipTypeServicecontext - The relevant DSpace contextentityType - The EntityType object used to check the leftType and rightType propertiesSQLException - If something goes wrongpublic RelationshipType create(Context context, EntityType leftEntityType, EntityType rightEntityType, String leftLabel, String rightLabel, Integer leftCardinalityMinInteger, Integer leftCardinalityMaxInteger, Integer rightCardinalityMinInteger, Integer rightCardinalityMaxInteger) throws SQLException, AuthorizeException
RelationshipTypeServicecreate in interface RelationshipTypeServicecontext - The relevant DSpace contextleftEntityType - The leftEntityType EntityType object for this relationshipTyperightEntityType - The rightEntityType EntityType object for this relationshipTypeleftLabel - The leftLabel String object for this relationshipTyperightLabel - The rightLabel 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 relationshipTypeSQLException - If something goes wrongAuthorizeException - If something goes wrongpublic RelationshipType find(Context context, int id) throws SQLException
find in interface DSpaceCRUDService<RelationshipType>SQLExceptionpublic void update(Context context, RelationshipType relationshipType) throws SQLException, AuthorizeException
update in interface DSpaceCRUDService<RelationshipType>SQLExceptionAuthorizeExceptionpublic void update(Context context, List<RelationshipType> relationshipTypes) throws SQLException, AuthorizeException
update in interface DSpaceCRUDService<RelationshipType>SQLExceptionAuthorizeExceptionpublic void delete(Context context, RelationshipType relationshipType) throws SQLException, AuthorizeException
delete in interface DSpaceCRUDService<RelationshipType>SQLExceptionAuthorizeExceptionCopyright © 2019 DuraSpace. All rights reserved.