|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthep.aida.ref.sql.Accessor
public class Accessor
Accessor
provides access to RDBMS.
Following properties are required:
hep.aida.ref.sql.db
hep.aida.ref.sql.schema
, optionalhep.aida.ref.sql.name
, optionalhep.aida.ref.sql.src
,
default = hep/aida/ref/sql/StmtSrc.properties
hep.aida.ref.sql.user
hep.aida.ref.sql.passwd
$Log: Accessor.java,v $
Revision 1.54 2007/09/26 07:58:51 hrivnac
cache savable fromjas menu
Revision 1.53 2007/05/23 16:38:43 hrivnac
logical connections for Plotter; better UML
Revision 1.52 2007/05/22 23:33:20 hrivnac
Plotter uses real arguments parsing
Revision 1.51 2006/12/15 00:16:13 hrivnac
FORWARD_ONLY allows to plot big ntuples
Revision 1.50 2006/12/12 15:21:42 hrivnac
McKoi replaced with Derby; uppercase-only dbs handled better; moving to JAS 0.8.3
Revision 1.49 2006/11/20 13:51:59 hrivnac
Connection is closed except within JAS3
Revision 1.48 2006/11/15 16:16:01 hrivnac
Oracle work fine in CERN, cache enabled
Revision 1.47 2004/12/07 01:04:56 hrivnac
name pattern can be specified
Revision 1.46 2004/12/01 16:07:15 hrivnac
better support for ColMan JAS3 plugin
Revision 1.45 2004/11/24 14:32:32 hrivnac
better support for schemas
Revision 1.44 2004/11/22 18:09:52 hrivnac
Oracle treatment
Revision 1.43 2004/10/29 22:27:25 hrivnac
imports corrected
Revision 1.42 2004/10/27 14:19:03 hrivnac
small bug fixes
Revision 1.41 2004/10/22 15:32:59 hrivnac
cleaned
Revision 1.40 2004/10/22 14:22:44 hrivnac
properties loading refactored
Revision 1.39 2004/10/20 23:02:29 hrivnac
Types mapping simplified
Revision 1.38 2004/10/12 13:25:40 hrivnac
small improvements
Revision 1.37 2004/10/08 15:22:33 hrivnac
JAS3 plugin works
Revision 1.36 2004/05/22 15:12:59 hrivnac
class id reformated
Revision 1.35 2004/04/16 15:32:57 hrivnac
Type.properties to setup Type.class
Revision 1.34 2004/04/14 13:54:41 hrivnac
potential bugs fixed
Revision 1.33 2004/04/14 13:39:46 hrivnac
1.5 warnings fixed
Revision 1.32 2004/04/13 15:45:54 hrivnac
AIDA URL introduced
Revision 1.31 2004/03/10 13:55:57 hrivnac
*** empty log message ***
Revision 1.30 2004/03/10 13:55:15 hrivnac
*** empty log message ***
Revision 1.29 2004/02/12 16:39:40 hrivnac
niceing
Revision 1.28 2004/02/10 14:50:58 hrivnac
JavaDoc tags completed
Revision 1.27 2004/02/04 13:30:39 hrivnac
- improvement of Enums internal mapping
- general cleaning
Revision 1.26 2004/01/30 18:10:30 hrivnac
- StmtSrc.properties specified a Property
- customised FreeHEP AIDA services included in jar file
Revision 1.25 2003/11/20 17:21:57 hrivnac
Java 1.5 natively supported, Log4J reporting improved.
Revision 1.24 2003/11/17 10:18:28 hrivnac
Cleaning.
Revision 1.23 2003/11/05 19:46:22 hrivnac
- FreeHEP 1.2.1
- JAIDA 3.2.1
Revision 1.10 2003/10/10 13:21:36 hrivnac
Works between different DB technologies.
Revision 1.9 2003/10/10 10:12:21 hrivnac
All three testing pgms work.
Revision 1.5 2003/10/03 16:02:21 hrivnac
Better handling of multiple technologies.
Revision 1.3 2003/10/02 14:24:00 hrivnac
Cleaning.
Revision 1.2 2003/10/02 10:00:40 hrivnac
Cleaning.
Field Summary | |
---|---|
private static Map<Map,Accessor> |
_accessors
|
private Connection |
_connection
|
private String |
_db
|
private boolean |
_forwardOnly
|
private String |
_passwd
|
private String |
_protocol
|
private String |
_schema
|
private String |
_src
|
private Type |
_types
|
private String |
_user
|
private static boolean |
_withinJAS
|
private static Logger |
log
Logging . |
Constructor Summary | |
---|---|
private |
Accessor(Map optionsMap)
Creates using informations from Map . |
private |
Accessor(String optionsString)
Create using informations from properties String. |
Method Summary | |
---|---|
void |
close()
Close connection. |
void |
commit()
Commit. |
Connection |
connection()
Gives Connection , creates one if it doesn't exist yet. |
String |
creationCommand()
Give the database creation command, if needed. |
String |
db()
Give connected database name. |
String |
driver()
Give used driver. |
boolean |
equals(Object other)
Check, if both Accessor s use the same
driver , database , schema (if set),
user and src |
boolean |
forwardOnly()
Tell if ResultSet should be FOWARD_ONLY. |
static Accessor |
getAccessor(Map optionsMap)
Get Accesor corresponding to optionsMap if it already exists. |
static Accessor |
getAccessor(String optionsString)
Get Accesor corresponding to optionsString if it already exists. |
static boolean |
isWinhinJAS()
TBD |
String |
passwd()
Give connected user' password. |
String |
protocol()
Give used protocol. |
void |
rollback()
Roll back. |
String |
schema()
Give connected database schema. |
void |
setSrc(String src)
Set connected StmtSrc.properties . |
static void |
setWithinJAS()
TBD |
String |
sqlName(Class aidaType)
Give native SQL type name corresponding to Java Class. |
String |
src()
Give connected StmtSrc.properties . |
boolean |
supportsOnlyForwardOnly()
Tell if database supports only TYPE_FORWARD_ONLY cursor. |
boolean |
supportsOnlyUpperCase()
Tell if database supports only uppercase names.. |
boolean |
supportsReplication()
Tell if database supports replication. |
String |
toString()
|
String |
user()
Give connected user. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static boolean _withinJAS
private static Map<Map,Accessor> _accessors
private String _protocol
private Connection _connection
private Type _types
private String _db
private String _schema
private String _src
private String _user
private String _passwd
private boolean _forwardOnly
private static Logger log
Constructor Detail |
---|
private Accessor(Map optionsMap) throws SQLTupleException
Map
.
optionsMap
- The map of options to define the Accessor.
SQLTupleException
- if the Accessor can't be createdprivate Accessor(String optionsString) throws SQLTupleException
optionsString
- The string of name=option pairs to define the Accessor (separated by ;).
SQLTupleException
- if the Accessor can't be created.Method Detail |
---|
public static Accessor getAccessor(Map optionsMap) throws SQLTupleException
optionsMap
- The map of options to define the Accessor.
SQLTupleException
public static Accessor getAccessor(String optionsString) throws SQLTupleException
optionsString
- The string of name=option pairs to define the Accessor (separated by ;).
SQLTupleException
- if the Accessor can't be created.public Connection connection() throws SQLTupleException
Connection
, creates one if it doesn't exist yet.
SQLTupleException
- if the Connection can't be obtained.public String sqlName(Class aidaType)
aidaType
- The Java Class representing AIDA type.
public void commit() throws SQLTupleException
SQLTupleException
- if the Connection
can't be commited.public void rollback() throws SQLTupleException
SQLTupleException
- if the Connection
can't be rolledback.public void close() throws SQLTupleException
SQLTupleException
- if the Connection
can't be closed.public boolean equals(Object other)
Accessor
s use the same
driver
, database
, schema
(if set),
user
and src
equals
in class Object
public String driver()
public String creationCommand()
public String protocol()
public boolean supportsReplication()
public boolean supportsOnlyForwardOnly()
public boolean supportsOnlyUpperCase()
public String db()
public String schema()
public void setSrc(String src)
StmtSrc.properties
.
src
- The StmtSrc to be used, null
means the default StmtSrc.public String src()
StmtSrc.properties
.
public String user()
public String passwd()
public boolean forwardOnly()
ResultSet
should be FOWARD_ONLY.
ResultSet
should be FOWARD_ONLY.public static void setWithinJAS()
public static boolean isWinhinJAS()
public String toString()
toString
in class Object
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |