Package net.sf.basedb.core
Class ChangeHistory.TransactionInfo
java.lang.Object
net.sf.basedb.core.ChangeHistory.TransactionInfo
- Enclosing class:
- ChangeHistory
public static class ChangeHistory.TransactionInfo extends Object
Holds information about a single transaction.
- Since:
- 3.19
-
Field Summary
Fields Modifier and Type Field Description private ChangeHistoryData
data
-
Constructor Summary
Constructors Constructor Description TransactionInfo(ChangeHistoryData data)
-
Method Summary
Modifier and Type Method Description Client
getClient(DbControl dc)
Load the client application that was used in the transaction.Integer
getClientId()
Get the ID of the client application that was used in the transaction.Job
getJob(DbControl dc)
Load the job that was executing the transaction.Integer
getJobId()
Get the ID of the job that was executing the transaction.String
getName()
Get the name of the transaction.PluginDefinition
getPlugin(DbControl dc)
Load the plug-in that was executing the transaction.Integer
getPluginId()
Get the ID of the plug-in that was executing the transaction.Project
getProject(DbControl dc)
Load the project that was active during the transaction.Integer
getProjectId()
Get the ID of the project that was active during the transaction.Session
getSession(DbControl dc)
Load the session in which the change was made.int
getSessionId()
Get the ID of the session the transaction.Date
getTime()
Get the date and time of the transaction.int
getTransactionId()
Get the ID of the transaction.User
getUser(DbControl dc)
Load the user that made the change.int
getUserId()
Get the ID of the user that executed the transaction.
-
Field Details
-
data
-
-
Constructor Details
-
TransactionInfo
TransactionInfo(ChangeHistoryData data)
-
-
Method Details
-
getTransactionId
public int getTransactionId()Get the ID of the transaction. -
getTime
Get the date and time of the transaction. -
getName
Get the name of the transaction. -
getUserId
public int getUserId()Get the ID of the user that executed the transaction. -
getUser
Load the user that made the change.- Parameters:
dc
- A DbControl to use for database access- Throws:
ItemNotFoundException
- If the user no longer exists in the databasePermissionDeniedException
- If the logged in user doesn't have permission to access the other user
-
getSessionId
public int getSessionId()Get the ID of the session the transaction. -
getSession
Load the session in which the change was made.- Parameters:
dc
- A DbControl to use for database access- Throws:
ItemNotFoundException
- If the session no longer exists in the databasePermissionDeniedException
- If the logged in user doesn't have permission to access the session
-
getClientId
Get the ID of the client application that was used in the transaction.- Returns:
- The ID or null if the client application is not known
-
getClient
Load the client application that was used in the transaction.- Parameters:
dc
- A DbControl to use for database access- Returns:
- A Client object or null if it is not known which client that was used
- Throws:
ItemNotFoundException
- If the client application no longer exists in the databasePermissionDeniedException
- If the logged in user doesn't have permission to access the client
-
getProjectId
Get the ID of the project that was active during the transaction.- Returns:
- The ID or null if no project was active
-
getProject
Load the project that was active during the transaction.- Parameters:
dc
- A DbControl to use for database access- Returns:
- A Project object or null if no project was active
- Throws:
ItemNotFoundException
- If the client application no longer exists in the databasePermissionDeniedException
- If the logged in user doesn't have permission to access the project
-
getPluginId
Get the ID of the plug-in that was executing the transaction.- Returns:
- The ID or null if the change was not made by a plug-in
-
getPlugin
Load the plug-in that was executing the transaction.- Parameters:
dc
- A DbControl to use for database access- Returns:
- A PluginDefinition object or null if the change was not made by a plug-in
- Throws:
ItemNotFoundException
- If the plug-in no longer exists in the databasePermissionDeniedException
- If the logged in user doesn't have permission to access the plug-in
-
getJobId
Get the ID of the job that was executing the transaction.- Returns:
- The ID or null if the no job was executing
-
getJob
Load the job that was executing the transaction.- Parameters:
dc
- A DbControl to use for database access- Returns:
- A Job object or null if no job was executing when the change was made
- Throws:
ItemNotFoundException
- If the job no longer exists in the databasePermissionDeniedException
- If the logged in user doesn't have permission to access the job
-