Package com.logicaldoc.core.history

# Class History

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.history.History

All Implemented Interfaces:
  `Serializable`, `Comparable<History>`

Direct Known Subclasses:
  `AbstractDocumentHistory`, `UserHistory`

@MappedSuperclass public abstract class History extends PersistentObject implements Comparable<History>
Superclass for history entries

Since:
  9.2
Author:
  Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class com.logicaldoc.core.PersistentObject

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`History()`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(History other)`
`boolean`
`equals(Object obj)`
`static Collection<String>`
`eventTables()`
Retrieves those histories that refer to events stored in the database and used for reports.
`String`
`getComment()`
`Date`
`getDate()`
`String`
`getDevice()`
`String`
`getEvent()`
`File`
`getFile()`
`String`
`getGeolocation()`
`String`
`getImpersonator()`
`String`
`getIp()`
`String`
`getKeyLabel()`
`Boolean`
`getOverwrite()`
`String`
`getPath()`
`String`
`getSessionId()`
`String`
`getTenant()`
`User`
`getUser()`
`Long`
`getUserId()`
`String`
`getUserLogin()`
`String`
`getUsername()`
`int`
`hashCode()`
`boolean`
`isNotified()`
`boolean`
`isNotifyEvent()`
`void`
`setClient(Client client)`
This setter sets the ip, device and other informations that can be captured by the given client
`void`
`setComment(String comment)`
`void`
`setDate(Date date)`
`void`
`setDevice(String device)`
`void`
`setEvent(String event)`
Sets the event key
`void`
`setFile(File file)`
`void`
`setGeolocation(String geolocation)`
`void`
`setImpersonator(String impersonator)`
`void`
`setIp(String ip)`
`void`
`setKeyLabel(String keyLabel)`
`void`
`setNotified(boolean notified)`
`void`
`setNotifyEvent(boolean notifyEvent)`
`void`
`setOverwrite(Boolean overwrite)`
`void`
`setPath(String path)`
`void`
`setSession(Session session)`
This setter sets the sessionId, userId, username and other informations that can be captured by the given session
`void`
`setSessionId(String sessionId)`
`void`
`setTenant(String tenant)`
`void`
`setUser(User user)`
This setter sets the userId and username and other informations that can be captured by the given user
`void`
`setUserId(Long userId)`
`void`
`setUserLogin(String login)`
`void`
`setUsername(String username)`
`String`
`toString()`

### Methods inherited from class com.logicaldoc.core.PersistentObject

`getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### History

public History()

## Method Details

### getPath

public String getPath()

### setPath

public void setPath(String path)

### getDate

public Date getDate()

Returns:
  Returns the date.

### setDate

public void setDate(Date date)

Parameters:
  `date` - The date to set.

### setEvent

public void setEvent(String event)
Sets the event key

Parameters:
  `event` - key of the event

### getEvent

public String getEvent()

Returns:
  Returns the event.

### getUsername

public String getUsername()

Returns:
  Returns the username.

### setUsername

public void setUsername(String username)

Parameters:
  `username` - The username to set.

### getComment

public String getComment()

### setComment

public void setComment(String comment)

### isNotified

public boolean isNotified()

### setNotified

public void setNotified(boolean notified)

### getSessionId

public String getSessionId()

### setSessionId

public void setSessionId(String sessionId)

### getFile

public File getFile()

### setFile

public void setFile(File file)

### getImpersonator

public String getImpersonator()

### setImpersonator

public void setImpersonator(String impersonator)

### getUser

public User getUser()

### setSession

public void setSession(Session session)
This setter sets the sessionId, userId, username and other informations that can be captured by the given session

Parameters:
  `session` - the session to read informations from

### setUser

public void setUser(User user)
This setter sets the userId and username and other informations that can be captured by the given user

Parameters:
  `user` - the user to read informations from

### setClient

public void setClient(Client client)
This setter sets the ip, device and other informations that can be captured by the given client

Parameters:
  `client` - the client to read informations from

### getTenant

public String getTenant()

### setTenant

public void setTenant(String tenant)

### getUserLogin

public String getUserLogin()

### setUserLogin

public void setUserLogin(String login)

### isNotifyEvent

public boolean isNotifyEvent()

### setNotifyEvent

public void setNotifyEvent(boolean notifyEvent)

### getIp

public String getIp()

### setIp

public void setIp(String ip)

### getUserId

public Long getUserId()

### setUserId

public void setUserId(Long userId)

### getGeolocation

public String getGeolocation()

### setGeolocation

public void setGeolocation(String geolocation)

### getDevice

public String getDevice()

### setDevice

public void setDevice(String device)

### getKeyLabel

public String getKeyLabel()

### setKeyLabel

public void setKeyLabel(String keyLabel)

### getOverwrite

public Boolean getOverwrite()

### setOverwrite

public void setOverwrite(Boolean overwrite)

### toString

public String toString()

Overrides:
  `toString` in class `PersistentObject`

### compareTo

public int compareTo(History other)

Specified by:
  `compareTo` in interface `Comparable<History>`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `PersistentObject`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `PersistentObject`

### eventTables

public static Collection<String> eventTables()
Retrieves those histories that refer to events stored in the database and used for reports. It looks for those histories that also declare the `Table` annotation.

Returns:
  Collection of table names