Go to the documentation of this file.
19package org.sleuthkit.autopsy.centralrepository.datamodel;
21import java.util.Objects;
22import java.util.regex.Pattern;
39 if (
null == s || s.isEmpty())
44 if (!Pattern.matches(pattern, s))
49 if ((min !=
null && num < min) || (max !=
null && num > max))
125 validateNum(
port, 1, 65535,
"Invalid port. Must be a number greater than 0.");
138 "Invalid database name. Name must start with a lowercase letter and can only contain lowercase letters, numbers, and '_'.");
140 this.dbName =
dbName.toLowerCase();
162 "Invalid user name. Name must start with a letter and can only contain letters, numbers, and '_'.");
180 hash = 43 * hash + Objects.hashCode(this.host);
181 hash = 43 * hash + this.port;
182 hash = 43 * hash + Objects.hashCode(this.dbName);
183 hash = 43 * hash + this.bulkThreshold;
184 hash = 43 * hash + Objects.hashCode(this.userName);
185 hash = 43 * hash + Objects.hashCode(this.password);
198 if (getClass() != obj.getClass()) {
202 if (this.port != other.
port) {
208 if (!Objects.equals(
this.host, other.
host)) {
211 if (!Objects.equals(
this.dbName, other.
dbName)) {
214 if (!Objects.equals(
this.userName, other.
userName)) {
217 if (!Objects.equals(
this.password, other.
password)) {
void setHost(String host)
static final int DEFAULT_PORT
static final String DEFAULT_PASSWORD
boolean equals(Object obj)
void setDbName(String dbName)
static final String DEFAULT_HOST
void setBulkThreshold(int bulkThreshold)
static void validateNum(int num, Integer min, Integer max, String errMessage)
static void validateStr(String s, String errMessage)
static void validateRegex(String s, String pattern, String errMessage)
static final String DB_USER_NAMES_REGEX
void setUserName(String userName)
static final String DEFAULT_USERNAME
void setPassword(String password)
static final String DB_NAMES_REGEX
static final String DEFAULT_DBNAME
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.