|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectssbm.db.mapping.DataMapper
public class DataMapper
Questa classe rappresenta un data mapper elementare.
Espone solo i metodi per l’apertura e la chiusura della connessione al database e
per il recupero dell’ultimo ID inserito in una tavola del database.
Field Summary | |
---|---|
private DatabaseConnector |
db
La conessione al database dell'applicazione. |
protected static long |
INVALID_ID
Il numero intero che indica un ID non valido. |
Constructor Summary | |
---|---|
DataMapper()
Costruisce un'istanza connessa al database dell'applicazione. |
Method Summary | |
---|---|
void |
endMapping()
Chiude la connessione al database dell'applicazione. |
protected void |
finalize()
|
protected DatabaseConnector |
getDatabaseConnector()
Consente di accedere alla connessione al database dell'applicazione. |
protected long |
getLastInsertID()
Recupera l'ultimo ID inserito in una tavola del database e nell'ambito della connessione corrente. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private DatabaseConnector db
protected static long INVALID_ID
Constructor Detail |
---|
public DataMapper() throws DatabaseException
DatabaseException
- nel caso si verifichino errori durante la connessione
al database dell'applicazione.Method Detail |
---|
protected DatabaseConnector getDatabaseConnector()
public void endMapping() throws DatabaseException
DatabaseException
- nel caso si verifichino errori nella chiusura della connessione.protected long getLastInsertID() throws DatabaseException
INVALID_ID
se non č stato inserito alcun ID.
DatabaseException
- nel caso si verifichino degli errori nel recupero dell'ultimo ID inserito.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |