org.melati.example.contacts
Class ContactsDatabase
java.lang.Object
org.melati.poem.Database
org.melati.poem.generated.PoemDatabaseBase
org.melati.poem.PoemDatabase
org.melati.example.contacts.generated.ContactsDatabaseBase
org.melati.example.contacts.ContactsDatabase
- All Implemented Interfaces:
- ContactsDatabaseTables, ContactsDatabaseTablesBase, PoemDatabaseTablesBase, PoemDatabaseTables, TransactionPool
public class ContactsDatabase
- extends ContactsDatabaseBase
- implements ContactsDatabaseTables
Melati POEM generated, programmer modifyable stub.
Methods inherited from class org.melati.example.contacts.generated.ContactsDatabaseBase |
getCapabilityTable, getCategoryTable, getColumnInfoTable, getContactCategoryTable, getContactTable, getGroupCapabilityTable, getGroupMembershipTable, getGroupTable, getSettingTable, getTableCategoryTable, getTableInfoTable, getUserTable |
Methods inherited from class org.melati.poem.Database |
addConstraints, addTableAndCommit, administerCapability, administratorUser, beginExclusiveLock, beginSession, columns, defineTable, deleteTableAndCommit, disconnect, dump, dumpCacheAnalysis, endExclusiveLock, endSession, getCanAdminister, getCommittedConnection, getDbms, getDisplayName, getDisplayTables, getDisplayTables, getFreeTransactionsCount, getLastQuery, getName, getQueryCount, getTable, getTransactionsCount, givesCapabilitySQL, guestAccessToken, guestUser, hasCapability, inCommittedTransaction, incrementQueryCount, inSession, inSessionAsRoot, isFree, logCommits, logSQL, poemTransaction, quotedName, redefineTable, referencesTo, referencesTo, setCanAdminister, setCanAdminister, setDisplayName, setLogCommits, setLogSQL, setTransactionsMax, sqlQuery, sqlUpdate, tables, toString, transaction, transactionsMax, trimCache, uncache |
Methods inherited from interface org.melati.example.contacts.generated.ContactsDatabaseTablesBase |
getCapabilityTable, getCategoryTable, getColumnInfoTable, getContactCategoryTable, getContactTable, getGroupCapabilityTable, getGroupMembershipTable, getGroupTable, getSettingTable, getTableCategoryTable, getTableInfoTable, getUserTable |
ContactsDatabase
public ContactsDatabase()
connect
public void connect(String name,
String dbmsclass,
String url,
String username,
String password,
int maxConnections)
- Description copied from class:
Database
- Connect to an RDBMS database. This should be called once when the
application starts up; it will
- Open this.transactionsMax() JDBC Connections to
the database for subsequent `pooling'
- Unify (reconcile) the structural information about the database
given in
- the Database Structure Definition (i.e. embodied in
the boilerplate code generated from it), including the
POEM-standard tables defined in Poem.dsd;
- the metadata tables tableinfo and
columninfo;
- the actual JDBC metadata from the RDBMS.
Any tables or columns defined in the DSD or the metadata tables,
but not present in the actual database, will be created.
Conversely, entries will be created in the metadata tables for
tables and columns that don't have them. If an inconsistency is
detected between any of the three information sources (such as a
fundamental type incompatibility, or a string field which is
narrower in the database than it was declared to be), an exception
will be thrown. In that case the database will in theory be left
untouched, except that in Postgres (at least) all structural
updates happen immediately and irrevocably even if made from a
transaction subsequently rolled back.
- Overrides:
connect
in class Database
dbmsclass
- The Melati DBMS class (see org/melati/poem/dbms)
to use, usually specified in
org.melati.LogicalDatabase.properties.url
- The JDBC URL for the database; for instance
jdbc:postgresql:williamc. It is the
programmer's responsibility to make sure that an
appropriate driver has been loaded.username
- The username under which to establish JDBC connections
to the database. This has nothing to do with the
user/group/capability authentication performed by
Melati.password
- The password to go with the username.maxConnections
- The maximum number of concurrent Transactions allowed,
usually specified in
org.melati.LogicalDatabase.properties.- See Also:
Database.transactionsMax()
Copyright © 2000-2010 PanEris. All Rights Reserved.