All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.ravendb.client.serverwide.DatabaseRecord Maven / Gradle / Ivy

package net.ravendb.client.serverwide;

import net.ravendb.client.documents.indexes.AutoIndexDefinition;
import net.ravendb.client.documents.indexes.IndexDefinition;
import net.ravendb.client.documents.indexes.RollingIndex;
import net.ravendb.client.documents.indexes.RollingIndexDeployment;
import net.ravendb.client.documents.indexes.analysis.AnalyzerDefinition;
import net.ravendb.client.documents.operations.backups.PeriodicBackupConfiguration;
import net.ravendb.client.documents.operations.configuration.ClientConfiguration;
import net.ravendb.client.documents.operations.configuration.StudioConfiguration;
import net.ravendb.client.documents.operations.etl.RavenEtlConfiguration;
import net.ravendb.client.documents.operations.etl.olap.OlapConnectionString;
import net.ravendb.client.documents.operations.etl.olap.OlapEtlConfiguration;
import net.ravendb.client.documents.operations.etl.sql.SqlConnectionString;
import net.ravendb.client.documents.operations.etl.sql.SqlEtlConfiguration;
import net.ravendb.client.documents.operations.expiration.ExpirationConfiguration;
import net.ravendb.client.documents.operations.refresh.RefreshConfiguration;
import net.ravendb.client.documents.operations.replication.ExternalReplication;
import net.ravendb.client.documents.operations.replication.PullReplicationAsSink;
import net.ravendb.client.documents.operations.replication.PullReplicationDefinition;
import net.ravendb.client.documents.operations.revisions.RevisionsCollectionConfiguration;
import net.ravendb.client.documents.operations.revisions.RevisionsConfiguration;
import net.ravendb.client.documents.operations.timeSeries.TimeSeriesConfiguration;
import net.ravendb.client.documents.queries.sorting.SorterDefinition;
import net.ravendb.client.documents.operations.etl.RavenConnectionString;
import net.ravendb.client.primitives.UseSharpEnum;

import java.util.*;

public class DatabaseRecord {
    private String databaseName;
    private boolean disabled;
    private boolean encrypted;
    private long etagForBackup;
    private Map deletionInProgress;
    private Map rollingIndexes;
    private DatabaseStateStatus databaseState;
    private DatabaseLockMode lockMode;
    private DatabaseTopology topology;
    private ConflictSolver conflictSolverConfig;
    private DocumentsCompressionConfiguration documentsCompression;
    private Map sorters = new HashMap<>();
    private Map analyzers = new HashMap<>();
    private Map indexes;
    private Map> indexesHistory;
    private Map autoIndexes;
    private Map settings = new HashMap<>();
    private RevisionsConfiguration revisions;
    private TimeSeriesConfiguration timeSeries;
    private RevisionsCollectionConfiguration revisionsForConflicts;
    private ExpirationConfiguration expiration;
    private RefreshConfiguration refresh;
    private List periodicBackups = new ArrayList<>();
    private List externalReplications = new ArrayList<>();
    private List sinkPullReplications = new ArrayList<>();
    private List hubPullReplications = new ArrayList<>();
    private Map ravenConnectionStrings = new HashMap<>();
    private Map sqlConnectionStrings = new HashMap<>();
    private Map olapConnectionStrings = new HashMap<>();
    private List ravenEtls = new ArrayList<>();
    private List sqlEtls = new ArrayList<>();
    private List olapEtls = new ArrayList<>();
    private ClientConfiguration client;
    private StudioConfiguration studio;
    private long truncatedClusterTransactionCommandsCount;
    private Set unusedDatabaseIds = new HashSet<>();

    public DatabaseRecord() {
    }

    public DatabaseRecord(String databaseName) {
        this.databaseName = databaseName;
    }

    public String getDatabaseName() {
        return databaseName;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }

    public boolean isDisabled() {
        return disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    public Map getSettings() {
        return settings;
    }

    public void setSettings(Map settings) {
        this.settings = settings;
    }

    public ConflictSolver getConflictSolverConfig() {
        return conflictSolverConfig;
    }

    public void setConflictSolverConfig(ConflictSolver conflictSolverConfig) {
        this.conflictSolverConfig = conflictSolverConfig;
    }

    public DocumentsCompressionConfiguration getDocumentsCompression() {
        return documentsCompression;
    }

    public void setDocumentsCompression(DocumentsCompressionConfiguration documentsCompression) {
        this.documentsCompression = documentsCompression;
    }

    public boolean isEncrypted() {
        return encrypted;
    }

    public void setEncrypted(boolean encrypted) {
        this.encrypted = encrypted;
    }

    public long getEtagForBackup() {
        return etagForBackup;
    }

    public void setEtagForBackup(long etagForBackup) {
        this.etagForBackup = etagForBackup;
    }

    public Map getDeletionInProgress() {
        return deletionInProgress;
    }

    public void setDeletionInProgress(Map deletionInProgress) {
        this.deletionInProgress = deletionInProgress;
    }

    public Map getRollingIndexes() {
        return rollingIndexes;
    }

    public void setRollingIndexes(Map rollingIndexes) {
        this.rollingIndexes = rollingIndexes;
    }

    public DatabaseTopology getTopology() {
        return topology;
    }

    public void setTopology(DatabaseTopology topology) {
        this.topology = topology;
    }

    public Map getSorters() {
        return sorters;
    }

    public void setSorters(Map sorters) {
        this.sorters = sorters;
    }

    public Map getAnalyzers() {
        return analyzers;
    }

    public void setAnalyzers(Map analyzers) {
        this.analyzers = analyzers;
    }

    public Map getIndexes() {
        return indexes;
    }

    public void setIndexes(Map indexes) {
        this.indexes = indexes;
    }

    public Map getAutoIndexes() {
        return autoIndexes;
    }

    public void setAutoIndexes(Map autoIndexes) {
        this.autoIndexes = autoIndexes;
    }

    public RevisionsConfiguration getRevisions() {
        return revisions;
    }

    public void setRevisions(RevisionsConfiguration revisions) {
        this.revisions = revisions;
    }

    public TimeSeriesConfiguration getTimeSeries() {
        return timeSeries;
    }

    public void setTimeSeries(TimeSeriesConfiguration timeSeries) {
        this.timeSeries = timeSeries;
    }

    public ExpirationConfiguration getExpiration() {
        return expiration;
    }

    public void setExpiration(ExpirationConfiguration expiration) {
        this.expiration = expiration;
    }

    public List getPeriodicBackups() {
        return periodicBackups;
    }

    public void setPeriodicBackups(List periodicBackups) {
        this.periodicBackups = periodicBackups;
    }

    public List getExternalReplications() {
        return externalReplications;
    }

    public void setExternalReplications(List externalReplications) {
        this.externalReplications = externalReplications;
    }

    public List getSinkPullReplications() {
        return sinkPullReplications;
    }

    public void setSinkPullReplications(List sinkPullReplications) {
        this.sinkPullReplications = sinkPullReplications;
    }

    public List getHubPullReplications() {
        return hubPullReplications;
    }

    public void setHubPullReplications(List hubPullReplications) {
        this.hubPullReplications = hubPullReplications;
    }

    public Map getRavenConnectionStrings() {
        return ravenConnectionStrings;
    }

    public void setRavenConnectionStrings(Map ravenConnectionStrings) {
        this.ravenConnectionStrings = ravenConnectionStrings;
    }

    public Map getSqlConnectionStrings() {
        return sqlConnectionStrings;
    }

    public void setSqlConnectionStrings(Map sqlConnectionStrings) {
        this.sqlConnectionStrings = sqlConnectionStrings;
    }

    public Map getOlapConnectionStrings() {
        return olapConnectionStrings;
    }

    public void setOlapConnectionStrings(Map olapConnectionStrings) {
        this.olapConnectionStrings = olapConnectionStrings;
    }

    public List getRavenEtls() {
        return ravenEtls;
    }

    public void setRavenEtls(List ravenEtls) {
        this.ravenEtls = ravenEtls;
    }

    public List getSqlEtls() {
        return sqlEtls;
    }

    public void setSqlEtls(List sqlEtls) {
        this.sqlEtls = sqlEtls;
    }

    public List getOlapEtls() {
        return olapEtls;
    }

    public void setOlapEtls(List olapEtls) {
        this.olapEtls = olapEtls;
    }

    public ClientConfiguration getClient() {
        return client;
    }

    public void setClient(ClientConfiguration client) {
        this.client = client;
    }

    public StudioConfiguration getStudio() {
        return studio;
    }

    public void setStudio(StudioConfiguration studio) {
        this.studio = studio;
    }

    public long getTruncatedClusterTransactionCommandsCount() {
        return truncatedClusterTransactionCommandsCount;
    }

    public void setTruncatedClusterTransactionCommandsCount(long truncatedClusterTransactionCommandsCount) {
        this.truncatedClusterTransactionCommandsCount = truncatedClusterTransactionCommandsCount;
    }

    public DatabaseStateStatus getDatabaseState() {
        return databaseState;
    }

    public void setDatabaseState(DatabaseStateStatus databaseState) {
        this.databaseState = databaseState;
    }

    public DatabaseLockMode getLockMode() {
        return lockMode;
    }

    public void setLockMode(DatabaseLockMode lockMode) {
        this.lockMode = lockMode;
    }

    public Map> getIndexesHistory() {
        return indexesHistory;
    }

    public void setIndexesHistory(Map> indexesHistory) {
        this.indexesHistory = indexesHistory;
    }

    public RevisionsCollectionConfiguration getRevisionsForConflicts() {
        return revisionsForConflicts;
    }

    public void setRevisionsForConflicts(RevisionsCollectionConfiguration revisionsForConflicts) {
        this.revisionsForConflicts = revisionsForConflicts;
    }

    public RefreshConfiguration getRefresh() {
        return refresh;
    }

    public void setRefresh(RefreshConfiguration refresh) {
        this.refresh = refresh;
    }

    public Set getUnusedDatabaseIds() {
        return unusedDatabaseIds;
    }

    public void setUnusedDatabaseIds(Set unusedDatabaseIds) {
        this.unusedDatabaseIds = unusedDatabaseIds;
    }

    public static class IndexHistoryEntry {
        private IndexDefinition definition;
        private String source;
        private Date createdAt;
        private Map rollingDeployment;

        public IndexDefinition getDefinition() {
            return definition;
        }

        public void setDefinition(IndexDefinition definition) {
            this.definition = definition;
        }

        public String getSource() {
            return source;
        }

        public void setSource(String source) {
            this.source = source;
        }

        public Date getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(Date createdAt) {
            this.createdAt = createdAt;
        }

        public Map getRollingDeployment() {
            return rollingDeployment;
        }

        public void setRollingDeployment(Map rollingDeployment) {
            this.rollingDeployment = rollingDeployment;
        }
    }

    @UseSharpEnum
    public enum DatabaseLockMode {
        UNLOCK,
        PREVENT_DELETES_IGNORE,
        PREVENT_DELETES_ERROR
    }

    @UseSharpEnum
    public enum DatabaseStateStatus {
        NORMAL,
        RESTORE_IN_PROGRESS
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy