|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.peer.LyTransaction
public class LyTransaction
This class represents a transaction managed by the transaction manager. A transaction is associated with a user session (LyDataSession) and a data provider (LyDataProvider). When a transaction is open, all requests for the data provider in the user session are stored in the transaction.
LyDataProvider
,
LyRequestEncoder
,
LyConnection
,
LyTransactionManager
Nested Class Summary | |
---|---|
static class |
LyTransaction.Operation
Operation types. |
static class |
LyTransaction.Status
Statuses of the transaction. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.String |
TRANSACTION_TIMEOUT
Constant for user transaction timeout parameter in the property file. |
static java.lang.String |
USER_TRANSACTION_NAME
Constant for user transaction name parameter in the property file. |
Method Summary | |
---|---|
void |
addDataProvider(LyDataProvider provider)
Add a data provider to this transaction. |
void |
addNotification(LyEventNotifier notifier,
LyEventNotifier.EventType notification,
LyClass peerClass,
java.lang.Object object,
LyValueSet values)
Internal method to register notifications on the transaction. |
void |
begin()
To begin this transaction. |
void |
commit()
To commit the transaction. |
LyResponse |
createObject(LyDataSource dataSource,
java.lang.Object peer,
LyResponseListener listener,
LyClassBinding classBinding)
Create a new object on the specified data source. |
LyResponse |
deleteObject(LyDataSource dataSource,
java.lang.Object peer,
LyResponseListener listener,
LyClassBinding classBinding)
Delete an object on the specified data source. |
LyResponse |
deleteObjects(LyDataSource dataSource,
java.util.Vector<java.lang.Object> peers,
LyResponseListener listener,
LyClassBinding classBinding)
Delete a list of objects on the specified data source. |
LyApplication |
getApplication()
Accessor to the user parent application. |
LyConnection |
getConnection(LyDataProvider provider)
To get the connection associated with this transaction and the specified provider. |
LyEnvironment |
getEnvironment()
Accessor to the environment of this transaction. |
java.util.Vector<LyDataProvider> |
getProviders()
Get all data providers of this transaction. |
LyDataSession |
getSession()
Accessor to the associated user session. |
int |
getSize(LyDataSource dataSource,
LyFilter peerFilter,
LyClassBinding classBinding)
Return the number of objects within the specified data source matching the given filter. |
LyTransaction.Status |
getStatus()
Accessor to the current status. |
java.lang.Thread |
getThread()
Accessor to the associated thread. |
java.rmi.server.UID |
getUID()
Internal method to get the unique identifier of the user transaction. |
LyResponse |
loadObject(LyDataSource dataSource,
LyObjectId peerId,
java.util.Vector<LyField> peerFields,
LyResponseListener listener,
LyClassBinding classBinding)
Method to load an object from its id on the specified data source. |
LyResponse |
loadObjects(LyDataSource dataSource,
java.util.Vector<LyField> peerFields,
LySort peerSort,
LyFilter peerFilter,
int n,
LyResponseListener listener,
LyClassBinding classBinding)
Method for loading objects on the specified data source. |
boolean |
prepareCommit()
This method is called before a commit operation. |
void |
rollback()
To rollback the transaction. |
LyResponse |
setObject(LyDataSource dataSource,
java.lang.Object peer,
LyResponseListener listener,
LyClassBinding classBinding)
Set an object on the specified data source. |
LyResponse |
setObjects(LyDataSource dataSource,
java.util.Vector<java.lang.Object> peers,
LyResponseListener listener,
LyClassBinding classBinding)
Set a list of objects on the specified data source. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String USER_TRANSACTION_NAME
public static final java.lang.String TRANSACTION_TIMEOUT
Method Detail |
---|
public final LyTransaction.Status getStatus()
public final LyApplication getApplication()
public final LyDataSession getSession()
public final LyEnvironment getEnvironment()
public final java.lang.Thread getThread()
public final void addDataProvider(LyDataProvider provider)
provider
- the added data providerpublic java.rmi.server.UID getUID()
public void begin()
public boolean prepareCommit()
public void commit()
public void rollback()
public LyConnection getConnection(LyDataProvider provider)
provider
- the provider to get the connection
public LyResponse deleteObject(LyDataSource dataSource, java.lang.Object peer, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for deleting the object.peer
- Object to delete.listener
- Listener of the response.classBinding
- Binding between logical class and physical class This binding may
contain extra information required for encoding the request.
LyDataSource.deleteObject(java.lang.Object, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public LyResponse deleteObjects(LyDataSource dataSource, java.util.Vector<java.lang.Object> peers, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for deleting the objects.peers
- List of objects to delete.listener
- Listener of the response.classBinding
- Binding between logical class and physical class This binding may
contain extra information required for encoding the request.
LyDataSource.deleteObjects(java.util.Vector extends java.lang.Object>, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public LyResponse createObject(LyDataSource dataSource, java.lang.Object peer, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for creating the object.peer
- Object to create.listener
- Listener of the response.classBinding
- Binding between logical class and physical class. This binding may
contain extra information required for encoding the request.
LyDataSource.createObject(java.lang.Object, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public LyResponse setObject(LyDataSource dataSource, java.lang.Object peer, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for setting the object.peer
- Object to modify.listener
- Listener of the response.classBinding
- Binding between logical class and physical class This binding may
contain extra information required for encoding the request.
LyDataSource.setObject(java.lang.Object, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public LyResponse setObjects(LyDataSource dataSource, java.util.Vector<java.lang.Object> peers, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for setting the objects.peers
- List of objects to modify.listener
- Listener of the response.classBinding
- Binding between logical class and physical class This binding may
contain extra information required for encoding the request.
LyDataSource.setObjects(java.util.Vector extends java.lang.Object>, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public LyResponse loadObject(LyDataSource dataSource, LyObjectId peerId, java.util.Vector<LyField> peerFields, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for loading the object.peerId
- Object identifier corresponding to the object to load.peerFields
- Fields to load (null means all fields).listener
- Listener of the response.classBinding
- binding between logical class and physical class This binding may
contain extra information required for encoding the request.
LyDataSource.loadObject(leon.data.LyObjectId, java.util.Vector extends leon.data.LyField>, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public LyResponse loadObjects(LyDataSource dataSource, java.util.Vector<LyField> peerFields, LySort peerSort, LyFilter peerFilter, int n, LyResponseListener listener, LyClassBinding classBinding)
dataSource
- The data source for loading the objects.peerFields
- Fields to load (null means all fields).peerSort
- Gives sort criteria, or null if there is no sort (the order is the one
of the physical layer).peerFilter
- Gives filter criteria, or null if there is no filter (all objects).n
- Indicates the number of objects to load (-1 means no limit).listener
- Listener of the response.classBinding
- binding between logical class and physical class This binding may
contain extra information required for encoding the request.
LyDataSource.loadObjects(java.util.Vector extends leon.data.LyField>, leon.info.LySort, leon.info.LyFilter, int, leon.data.LyResponseListener, leon.info.binding.LyClassBinding)
public int getSize(LyDataSource dataSource, LyFilter peerFilter, LyClassBinding classBinding)
dataSource
- The data source for getting the number of objects.peerFilter
- Filter applied on objects for counting.classBinding
- Binding between logical class and physical class. This binding may
contain extra information required for encoding the request (such as
extra filter).
LyDataSource.getSize()
public void addNotification(LyEventNotifier notifier, LyEventNotifier.EventType notification, LyClass peerClass, java.lang.Object object, LyValueSet values)
notifier
- the notifier to send the notification.notification
- the type of the added notification.peerClass
- the class of the object.object
- the object on which is the notification.values
- old values of the object when the notification is a modification (else
null).public java.util.Vector<LyDataProvider> getProviders()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |