public class DatabaseStorageHandler_ScheduleList extends java.lang.Object implements PersistenceServiceScheduleList
ScheduleList
s from or to a database.Constructor and Description |
---|
DatabaseStorageHandler_ScheduleList()
Instantiates a new database storage handler schedule list (default constructor).
|
Modifier and Type | Method and Description |
---|---|
int |
deleteScheduleList(int idScheduleList)
Deletes the ScheduleList specified by its ID.
|
int |
deleteScheduleList(ScheduleList scheduleListToDelete)
Deletes the ScheduleList specified by its instance.
|
int |
deleteScheduleListsBySetupName(java.lang.String setupName)
Delete schedule lists by the specified setup name.
|
int |
getIndexPositionOfMenuItem()
Has to return a desired index position for the JMenuItem to be returned through the current implementation.
|
javax.swing.JMenuItem |
getJMenueItem(PersistenceHandler.PersistenceAction action)
Has to return a JMenuItem for the specified persistence action.
|
de.enflexit.common.swing.ProgressMonitor |
getProgressMonitor()
Gets the progress monitor.
|
java.util.List<java.lang.Integer> |
getScheduleIDs(int idScheduleList,
java.lang.String strategyClass)
Gets the IDs of the schedules for a specific schedule list from the database
|
java.util.List<java.lang.Integer> |
getScheduleListIDs(java.lang.String networkID,
java.lang.String systemID,
java.lang.String setup)
Returns the schedule list IDs for a specific system from the database
|
java.util.List<ScheduleList> |
getScheduleListsForSystem(java.lang.String networkID,
java.lang.String systemID,
java.lang.String setup)
Gets the schedule lists for a specific system from the database
|
java.util.List<Schedule> |
getSchedulesForScheduleList(int idScheduleList,
java.lang.String strategyClass)
Gets the schedules for a specific schedule list from the database
|
ScheduleList |
loadScheduleList(ScheduleController sc,
java.awt.Component invoker)
Load a
ScheduleList . |
ScheduleList |
loadScheduleListFromDatabase(ScheduleListSelection slSelection)
Return the ScheduleList with the specified database ID.
|
int |
renameScheduleListsSetup(java.lang.String oldSetupName,
java.lang.String newSetupName)
Renames schedule lists setups.
|
boolean |
saveListOfTechnicalSystemStateEvaluation(int dbScheduleID,
java.util.List<TechnicalSystemStateEvaluation> tsseList,
org.hibernate.Session session)
Save list of technical system state evaluation.
|
boolean |
saveScheduleList(ScheduleController sc,
ScheduleList slSave,
java.awt.Component invoker)
Save the specified
ScheduleList . |
boolean |
saveScheduleList(ScheduleController sc,
ScheduleList slSave,
java.awt.Component invoker,
boolean avoidUserInteraction,
boolean showProgressMonitor,
boolean useIndividualThread)
Saves the specified ScheduleList.
|
boolean |
saveScheduleListAs(ScheduleController sc,
ScheduleList slSaveAs,
java.awt.Component invoker)
Save as the specified
ScheduleList . |
boolean |
saveTechnicalSystemStateEvaluation(int dbScheduleID,
TechnicalSystemStateEvaluation tsse)
Save the specified
TechnicalSystemStateEvaluation to the database within a single transaction. |
boolean |
saveTechnicalSystemStateEvaluation(int dbScheduleID,
TechnicalSystemStateEvaluation tsse,
boolean isUseIndividualTransaction,
org.hibernate.Session session)
Save the specified
TechnicalSystemStateEvaluation to the database. |
void |
setProgressMonitor(de.enflexit.common.swing.ProgressMonitor progressMonitor)
Sets the progress monitor.
|
boolean |
setScheduleListDateSaved(int scheduleListID,
long timestamp)
Sets the schedule list date saved.
|
public DatabaseStorageHandler_ScheduleList()
public javax.swing.JMenuItem getJMenueItem(PersistenceHandler.PersistenceAction action)
PersistenceService
ActionListener
to the menu item, since the
PersistenceHandler
will manage to invoke the required actions.getJMenueItem
in interface PersistenceService
action
- the persistence action that has to be executed with the returning menu itempublic int getIndexPositionOfMenuItem()
PersistenceService
getIndexPositionOfMenuItem
in interface PersistenceService
#getJMenueItem(PersistenceAction)
public ScheduleList loadScheduleList(ScheduleController sc, java.awt.Component invoker)
PersistenceServiceScheduleList
ScheduleList
.loadScheduleList
in interface PersistenceServiceScheduleList
sc
- the current ScheduleController
invoker
- the invoker componentpublic ScheduleList loadScheduleListFromDatabase(ScheduleListSelection slSelection)
slSelection
- the ScheduleListSelection
to consider while open a ScheduleListpublic java.util.List<java.lang.Integer> getScheduleListIDs(java.lang.String networkID, java.lang.String systemID, java.lang.String setup)
networkID
- the network ID (required)systemID
- the system ID (optional)setup
- the setup (optional)public java.util.List<ScheduleList> getScheduleListsForSystem(java.lang.String networkID, java.lang.String systemID, java.lang.String setup)
networkID
- the network ID (required)systemID
- the system ID (optional)setup
- the setup (optional)public java.util.List<java.lang.Integer> getScheduleIDs(int idScheduleList, java.lang.String strategyClass)
idScheduleList
- the id of the schedule list (required)strategyClass
- the strategy class (optional)public java.util.List<Schedule> getSchedulesForScheduleList(int idScheduleList, java.lang.String strategyClass)
idScheduleList
- the id of the schedule list (required)public boolean saveScheduleList(ScheduleController sc, ScheduleList slSave, java.awt.Component invoker)
PersistenceServiceScheduleList
ScheduleList
.saveScheduleList
in interface PersistenceServiceScheduleList
sc
- the current ScheduleController
slSave
- the ScheduleList to saveinvoker
- the invoker componentpublic boolean saveScheduleList(ScheduleController sc, ScheduleList slSave, java.awt.Component invoker, boolean avoidUserInteraction, boolean showProgressMonitor, boolean useIndividualThread)
sc
- the ScheduleController (may be null also)slSave
- the ScheduleList to saveinvoker
- the invoker componentavoidUserInteraction
- the indicator to avoid user interactionshowProgressMonitor
- the show progress monitoruseIndividualThread
- the indicator to use an individual threadpublic boolean saveScheduleListAs(ScheduleController sc, ScheduleList slSaveAs, java.awt.Component invoker)
PersistenceServiceScheduleList
ScheduleList
.saveScheduleListAs
in interface PersistenceServiceScheduleList
sc
- the current ScheduleController
slSaveAs
- the ScheduleList to save-asinvoker
- the invoker componentpublic boolean setScheduleListDateSaved(int scheduleListID, long timestamp)
scheduleListID
- the schedule list IDtimestamp
- the timestamppublic boolean saveListOfTechnicalSystemStateEvaluation(int dbScheduleID, java.util.List<TechnicalSystemStateEvaluation> tsseList, org.hibernate.Session session)
dbScheduleID
- the database ID of the Schedule
tsseList
- the list of TechnicalSystemStateEvaluation
session
- the current session to be used (may be null)public boolean saveTechnicalSystemStateEvaluation(int dbScheduleID, TechnicalSystemStateEvaluation tsse)
TechnicalSystemStateEvaluation
to the database within a single transaction.dbScheduleID
- the database ID of the Schedule
tsse
- the TechnicalSystemStateEvaluationpublic boolean saveTechnicalSystemStateEvaluation(int dbScheduleID, TechnicalSystemStateEvaluation tsse, boolean isUseIndividualTransaction, org.hibernate.Session session)
TechnicalSystemStateEvaluation
to the database.dbScheduleID
- the database ID of the Schedule
tsse
- the TechnicalSystemStateEvaluationisUseIndividualTransaction
- the is use individual transactionsession
- the current session to use (may be null)public int deleteScheduleList(ScheduleList scheduleListToDelete)
scheduleListToDelete
- the schedule list to deletepublic int deleteScheduleList(int idScheduleList)
idScheduleList
- the id schedule listpublic int deleteScheduleListsBySetupName(java.lang.String setupName)
setupName
- the setup namepublic int renameScheduleListsSetup(java.lang.String oldSetupName, java.lang.String newSetupName)
oldSetupName
- the old setup namenewSetupName
- the new setup namepublic de.enflexit.common.swing.ProgressMonitor getProgressMonitor()
public void setProgressMonitor(de.enflexit.common.swing.ProgressMonitor progressMonitor)
progressMonitor
- the new progress monitor