public abstract class BaseDatabase extends Object
| Constructor and Description |
|---|
BaseDatabase(DDatabase database)
Constructor.
|
BaseDatabase(DSession session,
NotesLocation location)
Constructor.
|
BaseDatabase(NotesLocation location)
Constructor.
|
BaseDatabase(String locationUri)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
create(Class clazz)
Creates a new instance of a business object with a given class.
|
protected DDatabase |
getDatabase()
Returns the database specified by the current location.
|
protected DSession |
getSession(NotesLocation location)
Creates and returns a new domingo session for a given location.
|
String |
getTitle()
The title of a database.
|
void |
map(DDocument document,
Object object)
Maps a domingo document to a business object.
|
void |
map(DViewEntry viewEntry,
Object object)
Maps a Domingo ViewEntry to a business object.
|
void |
map(Object object,
DDocument document)
Maps a business object to a domingo document.
|
protected void |
register(Class mapperClass)
Registers a mapper in the mapper factory.
|
protected abstract void |
registerMappers()
Implemented by derived class; must register all mappers.
|
void |
save(Object object)
Saves a business object.
|
public BaseDatabase(DSession session, NotesLocation location) throws DNotesException
session - an existing domingo sessionlocation - location of database.DNotesException - if the uri is invalid or the database cannot be
openedpublic BaseDatabase(String locationUri) throws DNotesException
locationUri - URI of location of database.DNotesException - if the uri is invalid or the database cannot be
openedpublic BaseDatabase(NotesLocation location) throws DNotesException
location - location of database.DNotesException - if the uri is invalid or the database cannot be
openedpublic BaseDatabase(DDatabase database) throws DNotesException
database - a notes databaseDNotesException - if the database is invalid or cannot be openedprotected final DSession getSession(NotesLocation location) throws DNotesException
location - location of database.DNotesException - if the uri is invalid or the database cannot be
openedprotected abstract void registerMappers()
throws MapperRegistrationException
MapperRegistrationException - if an error occurred during
registering a mapperprotected final void register(Class mapperClass) throws MapperRegistrationException
mapperClass - the class of the new mapperMapperRegistrationException - if an error occurred during
registering a mapperprotected final DDatabase getDatabase()
public final Object create(Class clazz)
clazz - class of business objectpublic final void save(Object object) throws MappingException
object - business object to saveMappingException - if an error occurred during mappingpublic final void map(Object object, DDocument document) throws MappingException
object - the business objectdocument - the domingo document to map toMappingException - if an error occurred during mappingMapper.map(java.lang.Object,
DDocument)public final void map(DDocument document, Object object) throws MappingException
document - the domingo document to mapobject - the business objectMappingException - if an error occurred during mappingMapper.map(DDocument,
java.lang.Object)public final void map(DViewEntry viewEntry, Object object) throws MappingException
viewEntry - the domingo ViewEntryobject - the business objectMappingException - if an error occurred during mappingDMapper.map(DViewEntry, Object)public final String getTitle()
DDatabase.getTitle()Copyright © 2005–2020. All rights reserved.