public class CableArticleService extends Object
CableArticleService is the service layer that handles cable article operations.| Constructor and Description |
|---|
CableArticleService() |
| Modifier and Type | Method and Description |
|---|---|
CableArticle |
createCableArticle(CableArticle cableArticle,
String userId)
Creates an cable article in the database and returns it.
|
CableArticle |
createCableArticle(String manufacturer,
String externalId,
String erpNumber,
String isoClass,
String description,
String longDescription,
String modelType,
Float bendingRadius,
Float outerDiameter,
Float ratedVoltage,
Float weightPerLength,
String shortName,
String shortNameExternalId,
String urlChessPart,
boolean active,
Date created,
Date modified,
String userId) |
boolean |
deleteCableArticle(CableArticle cableArticle,
String userId)
Marks the cable article as inactive in the database.
|
void |
detachAllCableArticles()
Performs clearing of the persistance context, thus detaching all entities.
|
void |
detachCableArticle(CableArticle cableArticle)
Detaches a single cable article from entity manager
|
List<CableArticle> |
getActiveCableArticles()
Return a list of all active cable articles.
|
CableArticle |
getCableArticleById(Long id)
Returns a cable article with the specified cable article id.
|
CableArticle |
getCableArticleByShortNameExternalId(String shortNameExternalId)
Return cable article by manufacturer and externalId.
|
List<CableArticle> |
getCableArticles()
Return a list of all cable articles.
|
List<CableArticle> |
getCableArticlesByExternalId(String externalId)
Return a list of all cable articles by externalId.
|
List<CableArticle> |
getCableArticlesByManufacturer(String manufacturer)
Return a list of all cable articles by manufacturer.
|
boolean |
updateCableArticle(CableArticle cableArticle,
CableArticle oldCableArticle,
String userId)
Updates the attributes on the given cable article.
|
public List<CableArticle> getCableArticles()
public List<CableArticle> getActiveCableArticles()
public CableArticle getCableArticleById(Long id)
id - the cable article idpublic CableArticle getCableArticleByShortNameExternalId(String shortNameExternalId)
shortNameExternalId - short name external idpublic List<CableArticle> getCableArticlesByManufacturer(String manufacturer)
manufacturer - manufacturerpublic List<CableArticle> getCableArticlesByExternalId(String externalId)
externalId - external idpublic CableArticle createCableArticle(String manufacturer, String externalId, String erpNumber, String isoClass, String description, String longDescription, String modelType, Float bendingRadius, Float outerDiameter, Float ratedVoltage, Float weightPerLength, String shortName, String shortNameExternalId, String urlChessPart, boolean active, Date created, Date modified, String userId)
public CableArticle createCableArticle(CableArticle cableArticle, String userId)
cableArticle - the cable article to adduserId - userId of user creating the cable article, for history recordpublic boolean updateCableArticle(CableArticle cableArticle, CableArticle oldCableArticle, String userId)
cableArticle - the cable article with modified attributes to save to the databaseoldCableArticle - the cable article before modificationuserId - username of user updating the cable article, for history recordpublic boolean deleteCableArticle(CableArticle cableArticle, String userId)
cableArticle - cable articleuserId - username of user deleting the cable article, for history recordpublic void detachAllCableArticles()
public void detachCableArticle(CableArticle cableArticle)
cableArticle - the cable article to detachCopyright © 2025 European Spallation Source. All rights reserved.