| java.lang.Object com.flexive.core.LifeCycleInfoImpl
LifeCycleInfoImpl | public class LifeCycleInfoImpl implements LifeCycleInfo,Serializable(Code) | | LifeCycleInfo implementation
author: Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) |
Constructor Summary | |
public | LifeCycleInfoImpl(long creatorId, long creationTime, long modificator, long modificationTime) |
Method Summary | |
public static LifeCycleInfo | createNew(UserTicket ticket) | public long | getCreationTime() | public long | getCreatorId() | public long | getModificationTime() | public long | getModificatorId() | public static LifeCycleInfo | load(ResultSet rs, int creatorColumn, int creationTimeColumn, int modificatorColumns, int modificationTimeColumn) | public static void | store(PreparedStatement ps, int creatorColumn, int creationTimeColumn, int modificatorColumn, int modificationTimeColumn) | public String | toString() | public static void | updateLifeCycleInfo(PreparedStatement ps, int modificatorColumn, int modificationTimeColumn) | public static void | updateLifeCycleInfo(String table, String idField, long id) | public static void | updateLifeCycleInfo(String table, String idField, String verField, long id, int ver, boolean updateCreated, boolean throwOnNone) |
EMPTY | final public static LifeCycleInfo EMPTY(Code) | | Empty LifeCycleInfo for tables where undefined
|
LifeCycleInfoImpl | public LifeCycleInfoImpl(long creatorId, long creationTime, long modificator, long modificationTime)(Code) | | Ctor
Parameters: creatorId - user id of the creator Parameters: creationTime - timestamp of creation Parameters: modificator - user id of the user that made the last modification Parameters: modificationTime - modification timestamp |
createNew | public static LifeCycleInfo createNew(UserTicket ticket)(Code) | | Initialize a new empty lci
Parameters: ticket - the calling user's ticket a new lifecycle info for the calling user |
getCreationTime | public long getCreationTime()(Code) | | Get the timestamp when this object was created
the timestamp when this object was created |
getCreatorId | public long getCreatorId()(Code) | | Get the Id of the User that created this entry
Id of the User that created this entry |
getModificationTime | public long getModificationTime()(Code) | | Get the timestamp of the most recent modification
timestamp of the most recent modification |
getModificatorId | public long getModificatorId()(Code) | | Get the Id of the most recent User that modified this entry
Id of the most recent User that modified this entry |
load | public static LifeCycleInfo load(ResultSet rs, int creatorColumn, int creationTimeColumn, int modificatorColumns, int modificationTimeColumn) throws SQLException(Code) | | Helper function for a less error prone and faster loading from the database
Parameters: rs - ResultSet containing all the required info Parameters: creatorColumn - column index of the create user reference Parameters: creationTimeColumn - column index of the create timestamp Parameters: modificatorColumns - column index of the modified by user reference Parameters: modificationTimeColumn - column index of the modified by timestamp LifeCycleInfo with the relevant data gathered from the ResultSet throws: java.sql.SQLException - if a column could not be read |
store | public static void store(PreparedStatement ps, int creatorColumn, int creationTimeColumn, int modificatorColumn, int modificationTimeColumn) throws SQLException(Code) | | Store a complete lifecycle info
Parameters: ps - prepared statement Parameters: creatorColumn - column index of the create user reference Parameters: creationTimeColumn - column index of the create timestamp Parameters: modificatorColumn - column index of the modified by user reference Parameters: modificationTimeColumn - column index of the modified by timestamp throws: java.sql.SQLException - if a column could not be set |
updateLifeCycleInfo | public static void updateLifeCycleInfo(PreparedStatement ps, int modificatorColumn, int modificationTimeColumn) throws SQLException(Code) | | Update a lifyecycle info
Parameters: ps - prepared statement Parameters: modificatorColumn - column index of the modified by user reference Parameters: modificationTimeColumn - column index of the modified by timestamp throws: java.sql.SQLException - if a column could not be set |
updateLifeCycleInfo | public static void updateLifeCycleInfo(String table, String idField, long id) throws FxUpdateException(Code) | | Update a tables LifeCycleInfo
Parameters: table - table that contains the lifecycle Parameters: idField - field containing the id Parameters: id - the id to update throws: FxUpdateException - if the lifecycle info could not be updated |
updateLifeCycleInfo | public static void updateLifeCycleInfo(String table, String idField, String verField, long id, int ver, boolean updateCreated, boolean throwOnNone) throws FxUpdateException(Code) | | Update a tables LifeCycleInfo
Parameters: table - table that contains the lifecycle Parameters: idField - field containing the id Parameters: id - the id to update Parameters: verField - field containing the id (optional) Parameters: ver - the version to update (optional) Parameters: updateCreated - update created by/at as well? Parameters: throwOnNone - throw an exception if no rows were updated? throws: FxUpdateException - if a database field could not be updated |
|
|