19 package org.sleuthkit.datamodel;
21 import java.util.Objects;
22 import java.util.ResourceBundle;
30 private static final ResourceBundle bundle = ResourceBundle.getBundle(
"org.sleuthkit.datamodel.Bundle");
33 private final long instanceId;
34 private final long accountId;
35 private final long dataSourceId;
54 this(skCase, instanceId, account.
getId(), dataSourceId, instanceType);
55 this.account = account;
71 this.instanceId = instanceId;
72 this.accountId = accountObjId;
73 this.dataSourceId = dataSourceObjId;
74 this.instanceType = instanceType;
95 if (account == null) {
98 }
catch (TskCoreException ex) {
99 throw new TskCoreException(String.format(
"Failed to get OsAccount for id %d", accountId), ex);
114 if (dataSource == null) {
118 throw new TskCoreException(String.format(
"Failed to get DataSource for id %d", dataSourceId), ex);
139 private long getDataSourceId() {
149 if (dataSourceId != other.getDataSourceId()) {
150 return Long.compare(dataSourceId, other.getDataSourceId());
153 return Long.compare(accountId, other.accountId);
164 if (getClass() != obj.getClass()) {
168 if (this.accountId != other.accountId) {
172 return this.dataSourceId != other.dataSourceId;
178 hash = 67 * hash + Objects.hashCode(this.dataSourceId);
179 hash = 67 * hash + Objects.hashCode(this.accountId);
180 hash = 67 * hash + Objects.hashCode(this.instanceType);
192 LAUNCHED(0, bundle.getString(
"OsAccountInstanceType.Launched.text"), bundle.getString(
"OsAccountInstanceType.Launched.descr.text")),
193 ACCESSED(1, bundle.getString(
"OsAccountInstanceType.Accessed.text"), bundle.getString(
"OsAccountInstanceType.Accessed.descr.text")),
194 REFERENCED(2, bundle.getString(
"OsAccountInstanceType.Referenced.text"), bundle.getString(
"OsAccountInstanceType.Referenced.descr.text"));
196 private final int id;
197 private final String name;
198 private final String description;
203 this.description = description;
242 if (statusType.ordinal() == typeId) {
OsAccount getOsAccountByObjectId(long osAccountObjId)
static OsAccountInstanceType fromID(int typeId)
int compareTo(OsAccountInstance other)
OsAccountInstanceType getInstanceType()
OsAccountManager getOsAccountManager()
DataSource getDataSource()
boolean equals(Object obj)
DataSource getDataSource(long objectId)
OsAccountInstanceType(int id, String name, String description)