public class EntityServiceImpl extends Object implements EntityService
| Modifier and Type | Field and Description |
|---|---|
protected EntityTypeService |
entityTypeService |
protected ItemService |
itemService |
protected RelationshipService |
relationshipService |
protected RelationshipTypeService |
relationshipTypeService |
| Constructor and Description |
|---|
EntityServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Entity |
findByItemId(Context context,
UUID itemId)
This will construct an Entity object that will be returned with the Item that matches the ItemID that was
passed along
as well as a list of relationships for that Item.
|
List<RelationshipType> |
getAllRelationshipTypes(Context context,
Entity entity)
Retrieves the list of relationships that have a relationshiptype that contains the EntityType for the given
Entity
in either the leftEntityType or the rightEntityType variables
|
List<Relationship> |
getLeftRelations(Context context,
Entity entity)
Retrieves the list of relationships, which are attached to the Entity object that is passed along, where the
left item object of each relationship is equal to the Item object of the Entity object that is passed along
|
List<RelationshipType> |
getLeftRelationshipTypes(Context context,
Entity entity)
Retrieves the list of relationships that have a relationshiptype that contains the EntityType for the given
Entity
in the leftEntityType
|
List<Relationship> |
getRelationsByLabel(Context context,
String label)
Retrieves the list of relationships for which their relationshiptype has a left or right label that is
equal to the passed along label String
|
List<RelationshipType> |
getRelationshipTypesByLabel(Context context,
String label)
Retrieves a list of RelationshipType objects for which either their left or right label is equal to the
label parameter that's being passed along
|
List<Relationship> |
getRightRelations(Context context,
Entity entity)
Retrieves the list of relationships, which are attached to the Entity object that is passed along, where the
right item object of each relationship is equal to the Item object of the Entity object that is passed along
|
List<RelationshipType> |
getRightRelationshipTypes(Context context,
Entity entity)
Retrieves the list of relationships that have a relationshiptype that contains the EntityType for the given
Entity
in the rightEntityType
|
EntityType |
getType(Context context,
Entity entity)
Returns the EntityType for the Item that is attached to the Entity that is passed along to this method.
|
@Autowired(required=true) protected EntityTypeService entityTypeService
@Autowired(required=true) protected RelationshipService relationshipService
@Autowired(required=true) protected RelationshipTypeService relationshipTypeService
@Autowired(required=true) protected ItemService itemService
public Entity findByItemId(Context context, UUID itemId) throws SQLException
EntityServicefindByItemId in interface EntityServicecontext - The relevant DSpace contextitemId - The ItemID for the Item that is to be used in the Entity objectSQLException - If something goes wrongpublic EntityType getType(Context context, Entity entity) throws SQLException
EntityServicegetType in interface EntityServicecontext - The relevant DSpace contextentity - The Entity object which contains the ItemSQLException - If something goes wrongpublic List<Relationship> getLeftRelations(Context context, Entity entity)
EntityServicegetLeftRelations in interface EntityServicecontext - The relevant DSpace contextentity - The Entity object to be returnedpublic List<Relationship> getRightRelations(Context context, Entity entity)
EntityServicegetRightRelations in interface EntityServicecontext - The relevant DSpace contextentity - The Entity object to be returnedpublic List<Relationship> getRelationsByLabel(Context context, String label) throws SQLException
EntityServicegetRelationsByLabel in interface EntityServicecontext - The relevant DSpace contextlabel - The label that needs to be in the relationshiptype of the relationshipSQLException - If something goes wrongpublic List<RelationshipType> getAllRelationshipTypes(Context context, Entity entity) throws SQLException
EntityServicegetAllRelationshipTypes in interface EntityServicecontext - The relevant DSpace contextentity - The Entity for which the EntityType should be checked for relationshipsSQLException - If something goes wrongpublic List<RelationshipType> getLeftRelationshipTypes(Context context, Entity entity) throws SQLException
EntityServicegetLeftRelationshipTypes in interface EntityServicecontext - The relevant DSpace contextentity - The Entity for which the EntityType should be checked for relationshipsSQLException - If something goes wrongpublic List<RelationshipType> getRightRelationshipTypes(Context context, Entity entity) throws SQLException
EntityServicegetRightRelationshipTypes in interface EntityServicecontext - The relevant DSpace contextentity - The Entity for which the EntityType should be checked for relationshipsSQLException - If something goes wrongpublic List<RelationshipType> getRelationshipTypesByLabel(Context context, String label) throws SQLException
EntityServicegetRelationshipTypesByLabel in interface EntityServicecontext - The relevant DSpace contextlabel - The label for which the relationshiptype's labels must be checkedSQLException - If something goes wrongCopyright © 2019 DuraSpace. All rights reserved.