| Constructor and Description |
|---|
CableTypeService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeCableTypeStatus(CableType cableType,
boolean active,
String userId)
Changes cable type's status in the database.
|
CableType |
createCableType(String name,
InstallationType installationType,
String description,
String service,
Integer voltage,
String insulation,
String jacket,
String flammability,
Float tid,
Float weight,
Float diameter,
List<CableTypeManufacturer> manufacturers,
String comments,
String revision,
String userId)
Creates a cable type in the database and returns it.
|
void |
detachAllCableTypes()
Performs clearing of the persistance context, thus detaching all entities.
|
void |
detachCableType(CableType cableType)
Detaches a single cable type from entity manager
|
List<CableType> |
getAllCableTypes() |
CableType |
getCableTypeByName(String name)
Retrieve cable type by the name.
|
List<CableType> |
getFilteredCableTypes(String customQuery,
Query query)
Return a list of filtered cable types.
|
Iterable<String> |
getFlammabilityValues(CableTypeActiveFilter filter)
Return an iteration of all distinct flammability values in the database.
|
Iterable<String> |
getInsulationValues(CableTypeActiveFilter filter)
Return an iteration of all distinct insulation values in the database.
|
Iterable<String> |
getJacketValues(CableTypeActiveFilter filter)
Return an iteration of all distinct jacket values in the database.
|
Iterable<String> |
getVoltageValues(CableTypeActiveFilter filter)
Return an iteration of all distinct voltage values in the database.
|
boolean |
updateCableType(CableType cableType,
CableType oldCableType,
String userId)
Updates the attributes on the given cable type.
|
public CableType getCableTypeByName(String name)
name - the cable type namepublic List<CableType> getFilteredCableTypes(String customQuery, Query query)
customQuery - custom queryquery - querypublic CableType createCableType(String name, InstallationType installationType, String description, String service, Integer voltage, String insulation, String jacket, String flammability, Float tid, Float weight, Float diameter, List<CableTypeManufacturer> manufacturers, String comments, String revision, String userId)
name - the name/codeinstallationType - the allowed installation typedescription - the descriptionservice - the service/function descriptionvoltage - the voltage rating descriptioninsulation - the insulation materialjacket - the type of jacketflammability - the flammability classificationtid - the total ionizing dose in mradweight - the weight in kg/meterdiameter - the outer diameter in mmmanufacturers - the manufacturers of this cable typecomments - the commentsrevision - the revisionuserId - username of user creating the cableType, for history recordpublic boolean updateCableType(CableType cableType, CableType oldCableType, String userId)
cableType - the cable type with modified attributes to save to the databaseoldCableType - the cable type before modificationuserId - username of user updating the cableType, for history recordpublic boolean changeCableTypeStatus(CableType cableType, boolean active, String userId)
cableType - the cable type to modifyactive - cable type's new statususerId - username of user modifying the cableType, for history recordtrue if the cable type's status was changed, false if the cable type's
status was already set to new status, no modification neededpublic Iterable<String> getVoltageValues(CableTypeActiveFilter filter)
filter - the filter to apply to the returned valuespublic Iterable<String> getInsulationValues(CableTypeActiveFilter filter)
filter - the filter to apply to the returned valuespublic Iterable<String> getJacketValues(CableTypeActiveFilter filter)
filter - the filter to apply to the returned valuespublic Iterable<String> getFlammabilityValues(CableTypeActiveFilter filter)
filter - the filter to apply to the returned valuespublic void detachAllCableTypes()
public void detachCableType(CableType cableType)
cableType - the cableType to detachCopyright © 2025 European Spallation Source. All rights reserved.