# Poco::Data

# class SessionImpl

Library: Data
Package: DataCore
Header: Poco/Data/SessionImpl.h

## Description

Interface for Session functionality that subclasses must extend. SessionImpl objects are noncopyable.

## Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Known Derived Classes: AbstractSessionImpl, PooledSessionImpl

## Member Summary

Member Functions: begin, close, commit, createStatementImpl, getFeature, getProperty, isConnected, isTransaction, rollback, setFeature, setProperty

Inherited Functions: duplicate, referenceCount, release

## Constructors

### SessionImpl

SessionImpl();

Creates the SessionImpl.

## Destructor

### ~SessionImpl

virtual ~SessionImpl();

Destroys the SessionImpl.

## Member Functions

### begin

virtual void begin() = 0;

Starts a transaction.

### close

virtual void close() = 0;

Closes the connection.

### commit

virtual void commit() = 0;

Commits and ends a transaction.

### createStatementImpl

virtual StatementImpl * createStatementImpl() = 0;

Creates a StatementImpl.

### getFeature

virtual bool getFeature(
const std::string & name
) = 0;

Look up the state of a feature.

Features are a generic extension mechanism for session implementations. and are defined by the underlying SessionImpl instance.

Throws a NotSupportedException if the requested feature is not supported by the underlying implementation.

### getProperty

virtual Poco::Any getProperty(
const std::string & name
) = 0;

Look up the value of a property.

Properties are a generic extension mechanism for session implementations. and are defined by the underlying SessionImpl instance.

Throws a NotSupportedException if the requested property is not supported by the underlying implementation.

### isConnected

virtual bool isConnected() = 0;

Returns true if and only if session is connected, false otherwise.

### isTransaction

virtual bool isTransaction() = 0;

Returns true if and only if a transaction is a transaction is in progress, false otherwise.

### rollback

virtual void rollback() = 0;

Aborts a transaction.

### setFeature

virtual void setFeature(
const std::string & name,
bool state
) = 0;

Set the state of a feature.

Features are a generic extension mechanism for session implementations. and are defined by the underlying SessionImpl instance.

Throws a NotSupportedException if the requested feature is not supported by the underlying implementation.

### setProperty

virtual void setProperty(
const std::string & name,
const Poco::Any & value
) = 0;

Set the value of a property.

Properties are a generic extension mechanism for session implementations. and are defined by the underlying SessionImpl instance.

Throws a NotSupportedException if the requested property is not supported by the underlying implementation.