001: /*
002: * Copyright (c) 1998 - 2005 Versant Corporation
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * Versant Corporation - initial API and implementation
010: */
011: package com.versant.core.jdbc;
012:
013: import java.util.ArrayList;
014: import java.util.HashMap;
015: import java.util.Map;
016:
017: /**
018: * Configuration for a JDBC store.
019: */
020: public class JdbcConfig {
021:
022: public String name;
023: public String db;
024: public String poolname;
025: public String url;
026: public String driver;
027: public String user;
028: public String password;
029: public String properties;
030: public String conFactory; // JNDI lookup name1
031:
032: // connection 2 stuff
033: public String driver2;
034: public String url2;
035: public String user2;
036: public String password2;
037: public String properties2;
038: public String conFactory2; // JNDI lookup name2
039:
040: public int maxActive;
041: public int maxIdle;
042: public int minIdle;
043: public int reserved;
044:
045: public int jdbcOptimisticLocking;
046: public boolean readOnly;
047: public int cacheStrategy;
048: public int inheritance;
049: public int defaultClassId;
050: public boolean jdbcDoNotCreateTable;
051: public boolean oidsInDefaultFetchGroup;
052: public boolean jdbcDisableStatementBatching;
053: public boolean jdbcDisablePsCache;
054: public boolean validateMappingOnStartup;
055: public boolean managedOneToMany;
056: public boolean managedManyToMany;
057:
058: public int isolationLevel;
059: public String initSQL;
060: public String validateSQL;
061: public boolean waitForConOnStartup;
062: public boolean testOnAlloc;
063: public boolean testOnRelease;
064: public boolean testOnException = true;
065: public boolean testWhenIdle = true;
066: public int retryIntervalMs = 100;
067: public int retryCount;
068: public int psCacheMax;
069: public int conTimeout;
070: public int testInterval;
071: public boolean blockWhenFull;
072: public int maxConAge;
073:
074: public String jdbcKeyGenerator;
075: public Map jdbcKeyGeneratorProps;
076:
077: public String jdbcNameGenerator;
078: public Map jdbcNameGeneratorProps;
079: public Map jdbcMigrationControlProps;
080:
081: public ArrayList typeMappings;
082: public ArrayList javaTypeMappings;
083:
084: /**
085: * Use hash of the fully qualified name of the class as descriminator.
086: */
087: public static final int DEFAULT_CLASS_ID_HASH = 1;
088: /**
089: * Dot use a descriminator column in heirachies.
090: */
091: public static final int DEFAULT_CLASS_ID_NO = 2;
092: /**
093: * Use the name of the class without package as descriminator.
094: */
095: public static final int DEFAULT_CLASS_ID_NAME = 3;
096: /**
097: * Use the fully qualified name of the class as descriminator.
098: */
099: public static final int DEFAULT_CLASS_ID_FULLNAME = 4;
100: }
|